diff options
author | Markos Chandras <mchandras@suse.de> | 2018-11-01 09:55:48 +0000 |
---|---|---|
committer | Markos Chandras <mchandras@suse.de> | 2018-11-01 09:57:29 +0000 |
commit | f5c5e11581e17919602fcc08a022ca190be2e18e (patch) | |
tree | 3609ed9acb4b4451c013a57e391268772ba44e5d /xci/playbooks | |
parent | 348bb6a8cea2b12ceca8941fa46e8290b18f0a55 (diff) |
xci: Add missing update_cache statements
When we install packages from the distro repos we need to make sure
that the database is updated. This also takes SUSE's zypper pkg manager
into consideration which can benefit from the same Ansible option.
Change-Id: I7a2206bfc5827b9ccb448278759711c560bb4679
Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/playbooks')
-rw-r--r-- | xci/playbooks/roles/create-nodes/tasks/main.yml | 2 | ||||
-rw-r--r-- | xci/playbooks/roles/prepare-tests/tasks/main.yml | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/xci/playbooks/roles/create-nodes/tasks/main.yml b/xci/playbooks/roles/create-nodes/tasks/main.yml index 0e51b411..8e54fcd1 100644 --- a/xci/playbooks/roles/create-nodes/tasks/main.yml +++ b/xci/playbooks/roles/create-nodes/tasks/main.yml @@ -8,6 +8,8 @@ - name: "Install required packages" package: name: "{{ required_packages }}" + update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" + state: present - include_tasks: prepare_libvirt.yml with_items: "{{ libvirt_networks }}" diff --git a/xci/playbooks/roles/prepare-tests/tasks/main.yml b/xci/playbooks/roles/prepare-tests/tasks/main.yml index b4e566c2..a543ac1f 100644 --- a/xci/playbooks/roles/prepare-tests/tasks/main.yml +++ b/xci/playbooks/roles/prepare-tests/tasks/main.yml @@ -11,6 +11,7 @@ - name: install required packages package: name: "{{ required_packages[ansible_pkg_mgr] }}" + update_cache: "{{ (ansible_pkg_mgr in ['apt', 'zypper']) | ternary('yes', omit) }}" state: present # Docker is needed for test frameworks |