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']
```
pull/54698/head
Steve Bonds 6 years ago committed by Brian Coca
parent c9d183f1f7
commit 95e5f89089

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

Loading…
Cancel
Save