From: Hiroyasu OHYAMA Date: Fri, 7 Apr 2017 03:16:07 +0000 (+0000) Subject: Corrected an argument which is passed to 'with_items' of the 'lineinfile' module... X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=29203a454c495039001f59cd9204d33013f6c2f4;p=github%2Ffretlink%2Fansible-rabbitmq.git Corrected an argument which is passed to 'with_items' of the 'lineinfile' module for evaluating list value --- diff --git a/README.md b/README.md index 03cd1aa..e416fc5 100644 --- a/README.md +++ b/README.md @@ -90,7 +90,7 @@ Example Playbook regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" state: present - with_items: groups['all'] + with_items: "{{ groups['all'] }}" - hosts: all become: true diff --git a/playbook.yml b/playbook.yml index 33cf1ab..1968320 100644 --- a/playbook.yml +++ b/playbook.yml @@ -11,7 +11,7 @@ regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" state: present - with_items: groups['all'] + with_items: "{{ groups['all'] }}" - hosts: all become: true