Update with_items loops to use new-ish "loop" keyword

Ansible 2.4 and 2.5 are moving away from specialized loop functions
and the old syntax will eventually be deprecated and removed. I did
not change the with_fileglob loops because I'm not sure about their
syntax yet.

See: https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html
This commit is contained in:
2018-04-02 15:52:51 +03:00
parent fbf61c8e61
commit 57120308dc
11 changed files with 21 additions and 21 deletions

View File

@ -18,7 +18,7 @@
- name: Install certbot dependencies (Ubuntu 16.04)
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version is version_compare('16.04', '==')
apt: name={{ item }} state=present update_cache=yes
with_items:
loop:
- augeas-doc
- augeas-tools
- binutils
@ -62,7 +62,7 @@
- name: Install certbot dependencies (Debian 9)
when: ansible_distribution == 'Debian' and ansible_distribution_major_version is version_compare('9', '==')
apt: name={{ item }} state=present update_cache=yes
with_items:
loop:
- augeas-doc
- augeas-tools
- autoconf