Need to use separate stanzas for each repo because the

args are different.  Sigh.
pull/100/head
Greg Althaus 2016-01-25 11:16:56 -06:00
parent 87fa167efa
commit c7bd2a2a1e
1 changed files with 7 additions and 5 deletions

View File

@ -33,11 +33,13 @@
always_run: True
tags: always
- name: Update package management cache
action:
module: "{{ ansible_pkg_mgr }}"
update_cache: yes
when: ansible_pkg_mgr in ['apt', 'yum']
- name: Update package management cache (APT)
apt: update_cache=yes
when: ansible_pkg_mgr == 'apt'
- name: Update package management cache (YUM)
yum: update_cache=yes name='*'
when: ansible_pkg_mgr == 'yum'
- name: Install python-apt for Debian distribs
shell: apt-get install -y python-apt