Replace ansible_hostname with inventory_hostname (#3559)
This way these examples can be re-used using the ansible command (and don't require facts gathering).
This commit is contained in:
parent
72ef33e7a6
commit
b11f4a51d1
1 changed files with 2 additions and 2 deletions
|
@ -82,11 +82,11 @@ EXAMPLES = '''
|
||||||
- fetch: src=/tmp/somefile dest=/tmp/fetched
|
- fetch: src=/tmp/somefile dest=/tmp/fetched
|
||||||
|
|
||||||
# Specifying a path directly
|
# Specifying a path directly
|
||||||
- fetch: src=/tmp/somefile dest=/tmp/prefix-{{ ansible_hostname }} flat=yes
|
- fetch: src=/tmp/somefile dest=/tmp/prefix-{{ inventory_hostname }} flat=yes
|
||||||
|
|
||||||
# Specifying a destination path
|
# Specifying a destination path
|
||||||
- fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
|
- fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
|
||||||
|
|
||||||
# Storing in a path relative to the playbook
|
# Storing in a path relative to the playbook
|
||||||
- fetch: src=/tmp/uniquefile dest=special/prefix-{{ ansible_hostname }} flat=yes
|
- fetch: src=/tmp/uniquefile dest=special/prefix-{{ inventory_hostname }} flat=yes
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue