note about adhoc delegate_to hosts (#74687)

* Update docs/docsite/rst/user_guide/playbooks_delegation.rst
pull/74738/head
Brian Coca 3 years ago committed by GitHub
parent ce04056797
commit 5333e4138c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,7 +77,9 @@ To specify more arguments, use the following syntax::
body: "{{ mail_body }}"
run_once: True
The `ansible_host` variable reflects the host a task is delegated to.
.. warning::
Although you can ``delegate_to`` a host that does not exist in inventory (by adding IP address, DNS name or whatever requirement the connection plugin has), doing so does not add the host to your inventory and might cause issues. Hosts delegated to in this way do not inherit variables from the "all" group', so variables like connection user and key are missing. If you must ``delegate_to`` a non-inventory host, use the :ref:`add host module <add_host_module>`.
.. _delegate_facts:

Loading…
Cancel
Save