From 17ea05683b272050959753bd92349dfbeab281f1 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Fri, 12 Oct 2018 09:00:50 +0300 Subject: [PATCH] Fix yum/apt module invocation The old way is deprecated and would stop working after Ansible 2.11. --- roles/matrix-server/tasks/setup_base.yml | 41 +++++++++++++----------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/roles/matrix-server/tasks/setup_base.yml b/roles/matrix-server/tasks/setup_base.yml index 04342536..20ba7a1f 100644 --- a/roles/matrix-server/tasks/setup_base.yml +++ b/roles/matrix-server/tasks/setup_base.yml @@ -18,24 +18,25 @@ when: ansible_distribution == 'CentOS' - name: Ensure yum packages are installed (CentOS) - yum: name="{{ item }}" state=latest update_cache=yes - with_items: - - bash-completion - - docker-ce - - docker-python - - firewalld - - ntp - - fuse + yum: + name: + - bash-completion + - docker-ce + - docker-python + - firewalld + - ntp + - fuse + state: latest + update_cache: yes when: ansible_distribution == 'CentOS' - name: Ensure APT usage dependencies are installed (Debian) apt: - name: "{{ item }}" + name: + - apt-transport-https + - ca-certificates state: present update_cache: yes - with_items: - - apt-transport-https - - ca-certificates when: ansible_os_family == 'Debian' - name: Ensure Docker's APT key is trusted (Debian) @@ -55,13 +56,15 @@ when: ansible_os_family == 'Debian' - name: Ensure APT packages are installed (Debian) - apt: name="{{ item }}" state=latest update_cache=yes - with_items: - - bash-completion - - docker-ce - - python-docker - - ntp - - fuse + apt: + name: + - bash-completion + - docker-ce + - python-docker + - ntp + - fuse + state: latest + update_cache: yes when: ansible_os_family == 'Debian' - name: Ensure firewalld is started and autoruns