Fix yum/apt module invocation
The old way is deprecated and would stop working after Ansible 2.11.
This commit is contained in:
parent
a1c1ec9b7f
commit
17ea05683b
@ -18,24 +18,25 @@
|
|||||||
when: ansible_distribution == 'CentOS'
|
when: ansible_distribution == 'CentOS'
|
||||||
|
|
||||||
- name: Ensure yum packages are installed (CentOS)
|
- name: Ensure yum packages are installed (CentOS)
|
||||||
yum: name="{{ item }}" state=latest update_cache=yes
|
yum:
|
||||||
with_items:
|
name:
|
||||||
- bash-completion
|
- bash-completion
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- docker-python
|
- docker-python
|
||||||
- firewalld
|
- firewalld
|
||||||
- ntp
|
- ntp
|
||||||
- fuse
|
- fuse
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
when: ansible_distribution == 'CentOS'
|
when: ansible_distribution == 'CentOS'
|
||||||
|
|
||||||
- name: Ensure APT usage dependencies are installed (Debian)
|
- name: Ensure APT usage dependencies are installed (Debian)
|
||||||
apt:
|
apt:
|
||||||
name: "{{ item }}"
|
name:
|
||||||
|
- apt-transport-https
|
||||||
|
- ca-certificates
|
||||||
state: present
|
state: present
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
with_items:
|
|
||||||
- apt-transport-https
|
|
||||||
- ca-certificates
|
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Ensure Docker's APT key is trusted (Debian)
|
- name: Ensure Docker's APT key is trusted (Debian)
|
||||||
@ -55,13 +56,15 @@
|
|||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Ensure APT packages are installed (Debian)
|
- name: Ensure APT packages are installed (Debian)
|
||||||
apt: name="{{ item }}" state=latest update_cache=yes
|
apt:
|
||||||
with_items:
|
name:
|
||||||
- bash-completion
|
- bash-completion
|
||||||
- docker-ce
|
- docker-ce
|
||||||
- python-docker
|
- python-docker
|
||||||
- ntp
|
- ntp
|
||||||
- fuse
|
- fuse
|
||||||
|
state: latest
|
||||||
|
update_cache: yes
|
||||||
when: ansible_os_family == 'Debian'
|
when: ansible_os_family == 'Debian'
|
||||||
|
|
||||||
- name: Ensure firewalld is started and autoruns
|
- name: Ensure firewalld is started and autoruns
|
||||||
|
Loading…
Reference in New Issue
Block a user