fix k8 aio flavor undefined variable 67/57267/3
authorwutianwei <wutianwei1@huawei.com>
Thu, 10 May 2018 12:04:52 +0000 (20:04 +0800)
committerwutianwei <wutianwei1@huawei.com>
Fri, 11 May 2018 07:28:31 +0000 (15:28 +0800)
1. fix error that kube_require_packages is undefined
2. add "remote_user: root" in configure-kubenet.yml
   if don't add this, it will have issue to connect host.
   fatal: [opnfv]:UNREACHABLE! => {"changed": false, "msg":
   "Failed to connect to thehost via ssh: Permission denied (publickey,password).\r\n",
   "unreachable": true"}

installer-type:kubespray
deploy-scenario:k8-nosdn-nofeature

Change-Id: Ia8d1980ad18375c0cff3a97b284b0f53d7539e23
Signed-off-by: wutianwei <wutianwei1@huawei.com>
xci/installer/kubespray/playbooks/configure-kubenet.yml
xci/installer/kubespray/playbooks/configure-opnfvhost.yml

index 1c3740b..3b1cb01 100644 (file)
@@ -13,6 +13,7 @@
 # so cbr0 interfaces can talk to each other.
 - name: Prepare networking for kubenet
   hosts: k8s-cluster
+  remote_user: root
   gather_facts: True
   become: yes
   vars_files:
index 7626b94..01904ba 100644 (file)
@@ -56,7 +56,7 @@
 
     - name: Install required packages
       package:
-        name: "{{ kube_require_packages[ansible_pkg_mgr] }}"
+        name: "{{ (ansible_pkg_mgr == 'zypper') | ternary('dbus-1', 'dbus') }}"
         state: present
         update_cache: "{{ (ansible_pkg_mgr == 'apt') | ternary('yes', omit) }}"
       when: xci_flavor == 'aio'