mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Clarify source of the host name (#54693)
The host could have been either the inventory name (`inventory_hostname`)
or the discovered hostname (`ansible_hostname`)
Inspecting the source code of `fetch.py` shows that the
inventory name is preferred.
```
if 'inventory_hostname' in task_vars:
target_name = task_vars['inventory_hostname']
```
This commit is contained in:
@@ -34,6 +34,7 @@ options:
|
|||||||
- A directory to save the file into.
|
- A directory to save the file into.
|
||||||
- For example, if the I(dest) directory is C(/backup) a I(src) file named C(/etc/profile) on host
|
- For example, if the I(dest) directory is C(/backup) a I(src) file named C(/etc/profile) on host
|
||||||
C(host.example.com), would be saved into C(/backup/host.example.com/etc/profile).
|
C(host.example.com), would be saved into C(/backup/host.example.com/etc/profile).
|
||||||
|
The host name is based on the inventory name.
|
||||||
required: yes
|
required: yes
|
||||||
fail_on_missing:
|
fail_on_missing:
|
||||||
version_added: '1.1'
|
version_added: '1.1'
|
||||||
|
|||||||
Reference in New Issue
Block a user