use os_family
This commit is contained in:
@@ -7,13 +7,9 @@
|
|||||||
- name: Update cache
|
- name: Update cache
|
||||||
apt:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
when:
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
- ansible_distribution == 'Debian'
|
|
||||||
- ansible_distribution == 'Ubuntu'
|
|
||||||
- name: Upgrade packages
|
- name: Upgrade packages
|
||||||
apt:
|
apt:
|
||||||
name: "*"
|
name: "*"
|
||||||
state: latest
|
state: latest
|
||||||
when:
|
when: ansible_facts['os_family'] == "Debian"
|
||||||
- ansible_distribution == 'Debian'
|
|
||||||
- ansible_distribution == 'Ubuntu'
|
|
||||||
|
|||||||
Reference in New Issue
Block a user