|
|
@ -129,8 +129,8 @@ EXAMPLES = r"""
|
|
|
|
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
|
|
|
|
marker: "<!-- {mark} ANSIBLE MANAGED BLOCK -->"
|
|
|
|
insertafter: "<body>"
|
|
|
|
insertafter: "<body>"
|
|
|
|
content: |
|
|
|
|
content: |
|
|
|
|
<h1>Welcome to {{ansible_hostname}}</h1>
|
|
|
|
<h1>Welcome to {{ ansible_hostname }}</h1>
|
|
|
|
<p>Last updated on {{ansible_date_time.iso8601}}</p>
|
|
|
|
<p>Last updated on {{ ansible_date_time.iso8601 }}</p>
|
|
|
|
|
|
|
|
|
|
|
|
- name: remove HTML as well as surrounding markers
|
|
|
|
- name: remove HTML as well as surrounding markers
|
|
|
|
blockinfile:
|
|
|
|
blockinfile:
|
|
|
@ -142,8 +142,8 @@ EXAMPLES = r"""
|
|
|
|
blockinfile:
|
|
|
|
blockinfile:
|
|
|
|
dest: /etc/hosts
|
|
|
|
dest: /etc/hosts
|
|
|
|
block: |
|
|
|
|
block: |
|
|
|
|
{{item.ip}} {{item.name}}
|
|
|
|
{{ 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 }
|
|
|
|
- { name: host2, ip: 10.10.1.11 }
|
|
|
|
- { name: host2, ip: 10.10.1.11 }
|
|
|
|