From d5ccebc6e1eb099c5d499669ab8c66b4706ceb77 Mon Sep 17 00:00:00 2001 From: Lik Date: Wed, 12 Jun 2019 00:49:05 +0300 Subject: [PATCH] replace simple with_items with loop --- tasks/configure.yml | 4 ++-- tasks/main.yml | 2 +- tests/docker_playbook.yml | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/configure.yml b/tasks/configure.yml index ebeeff5..04257f9 100644 --- a/tasks/configure.yml +++ b/tasks/configure.yml @@ -25,7 +25,7 @@ owner: root group: root mode: 0600 - with_items: + loop: - 'csf.allow' - 'csf.ignore' - 'csf.pignore' @@ -60,7 +60,7 @@ line: '{{ item }}|\1' state: present backrefs: yes - with_items: '{{ csf_blocklists }}' + loop: '{{ csf_blocklists }}' when: csf_blocklists is defined notify: - check csf conf diff --git a/tasks/main.yml b/tasks/main.yml index 3657242..18be323 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -29,7 +29,7 @@ name: '{{ item }}' state: started enabled: yes - with_items: + loop: - csf - lfd tags: diff --git a/tests/docker_playbook.yml b/tests/docker_playbook.yml index 5c1e9ce..b144435 100644 --- a/tests/docker_playbook.yml +++ b/tests/docker_playbook.yml @@ -29,7 +29,7 @@ privileged: true volumes: - '/sys/fs/cgroup:/sys/fs/cgroup:ro' - with_items: '{{ containers }}' + loop: '{{ containers }}' - name: add containers to inventory add_host: @@ -37,7 +37,7 @@ groups: docker_containers ansible_connection: docker changed_when: false - with_items: '{{ containers }}' + loop: '{{ containers }}' - name: run tasks in containers hosts: docker_containers @@ -52,7 +52,7 @@ docker_container: name: '{{ item.name }}' state: absent - with_items: '{{ containers }}' + loop: '{{ containers }}' changed_when: false tags: - destroy