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:
Dag Wieers 2016-04-27 17:31:04 +02:00 committed by Matt Clay
parent bf200458d3
commit 356d9a272a

View file

@ -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
'''