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
bf200458d3
commit
356d9a272a
1 changed files with 2 additions and 2 deletions
|
@ -82,11 +82,11 @@ EXAMPLES = '''
|
|||
- fetch: src=/tmp/somefile dest=/tmp/fetched
|
||||
|
||||
# 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
|
||||
- fetch: src=/tmp/uniquefile dest=/tmp/special/ flat=yes
|
||||
|
||||
# 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