mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fixed /etc/hosts example for blockinfile (#2387)
- Fixed name - Fixed name/ip order in template
This commit is contained in:
@@ -134,11 +134,11 @@ EXAMPLES = r"""
|
|||||||
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
|
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
|
||||||
content: ""
|
content: ""
|
||||||
|
|
||||||
- name: insert/update "Match User" configuation block in /etc/ssh/sshd_config
|
- name: Add mappings to /etc/hosts
|
||||||
blockinfile:
|
blockinfile:
|
||||||
dest: /etc/hosts
|
dest: /etc/hosts
|
||||||
block: |
|
block: |
|
||||||
{{item.name}} {{item.ip}}
|
{{item.ip}} {{item.name}}
|
||||||
marker: "# {mark} ANSIBLE MANAGED BLOCK {{item.name}}"
|
marker: "# {mark} ANSIBLE MANAGED BLOCK {{item.name}}"
|
||||||
with_items:
|
with_items:
|
||||||
- { name: host1, ip: 10.10.1.10 }
|
- { name: host1, ip: 10.10.1.10 }
|
||||||
|
|||||||
Reference in New Issue
Block a user