move the update cache after role of setup-k8s-network 65/52965/1
authorwutianwei <wutianwei1@huawei.com>
Fri, 2 Mar 2018 03:55:27 +0000 (11:55 +0800)
committerwutianwei <wutianwei1@huawei.com>
Fri, 2 Mar 2018 03:55:27 +0000 (11:55 +0800)
If don't setup network, the host cannot connect to the Internet on baremetal pod.
So we should update cache after setting the network.

Change-Id: Ief0eb2d82c67b0ace2cfb233b9792f6e009a1524
Signed-off-by: wutianwei <wutianwei1@huawei.com>
deploy/adapters/ansible/kubernetes/roles/install-k8s-dependence/tasks/main.yml
deploy/adapters/ansible/kubernetes/roles/pre-k8s/tasks/Ubuntu.yml

index e683a3f..4f8ca00 100644 (file)
@@ -24,5 +24,6 @@
   apt:
     pkg: "{{ item }}"
     state: "present"
+    update_cache: 'yes'
   with_items: "{{ packages }}"
   when: ansible_os_family == 'Debian'
index 8054267..44e3b1f 100644 (file)
@@ -67,9 +67,6 @@
     src: sources.list.official
     dest: /etc/apt/sources.list
 
-- name: update apt cache
-  apt: update_cache=yes
-
 - name: restart ntp service
   shell: "service ntp restart"