diff options
author | Hiroyasu OHYAMA <user.localhost2000@gmail.com> | 2017-04-07 03:16:07 +0000 |
---|---|---|
committer | Hiroyasu OHYAMA <user.localhost2000@gmail.com> | 2017-04-07 03:20:26 +0000 |
commit | 29203a454c495039001f59cd9204d33013f6c2f4 (patch) | |
tree | 9a35464b6c144b84f941500e9543e54ee457c042 | |
parent | 16dd29dd68381a3771b0c0cf84d05d1dfed05367 (diff) | |
download | ansible-rabbitmq-29203a454c495039001f59cd9204d33013f6c2f4.tar.gz ansible-rabbitmq-29203a454c495039001f59cd9204d33013f6c2f4.tar.zst ansible-rabbitmq-29203a454c495039001f59cd9204d33013f6c2f4.zip |
Corrected an argument which is passed to 'with_items' of the 'lineinfile' module for evaluating list value
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | playbook.yml | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -90,7 +90,7 @@ Example Playbook | |||
90 | regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | 90 | regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" |
91 | line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | 91 | line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" |
92 | state: present | 92 | state: present |
93 | with_items: groups['all'] | 93 | with_items: "{{ groups['all'] }}" |
94 | 94 | ||
95 | - hosts: all | 95 | - hosts: all |
96 | become: true | 96 | become: true |
diff --git a/playbook.yml b/playbook.yml index 33cf1ab..1968320 100644 --- a/playbook.yml +++ b/playbook.yml | |||
@@ -11,7 +11,7 @@ | |||
11 | regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | 11 | regexp: "^{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" |
12 | line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" | 12 | line: "{{ hostvars[item].ansible_ssh_host }} {{ item }} {{ item }}.{{ pri_domain_name }}" |
13 | state: present | 13 | state: present |
14 | with_items: groups['all'] | 14 | with_items: "{{ groups['all'] }}" |
15 | 15 | ||
16 | - hosts: all | 16 | - hosts: all |
17 | become: true | 17 | become: true |