Use update_cache when possible
parent
8f7d552401
commit
f5508b1794
|
@ -33,6 +33,12 @@
|
||||||
always_run: True
|
always_run: True
|
||||||
tags: always
|
tags: always
|
||||||
|
|
||||||
|
- name: Update package management cache
|
||||||
|
action:
|
||||||
|
module: "{{ ansible_pkg_mgr }}"
|
||||||
|
update_cache: yes
|
||||||
|
when: ansible_pkg_mgr in ['apt', 'yum']
|
||||||
|
|
||||||
- name: Install python-apt for Debian distribs
|
- name: Install python-apt for Debian distribs
|
||||||
shell: apt-get install -y python-apt
|
shell: apt-get install -y python-apt
|
||||||
when: ansible_os_family == "Debian"
|
when: ansible_os_family == "Debian"
|
||||||
|
|
Loading…
Reference in New Issue