mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
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:
@@ -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
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user