mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
fixed formatting (#45164)
(cherry picked from commit 58ca82fa1c59d3a62509db99c4bbff6eb08829ab)
This commit is contained in:
parent
8fb589d55e
commit
fe119c18ef
1 changed files with 5 additions and 7 deletions
|
@ -870,7 +870,7 @@ Basically, anything that goes into "role defaults" (the defaults folder inside t
|
||||||
This variable, ``ansible_group_priority``, can only be set in the inventory source and not in group_vars/ as the variable is used in the loading of group_vars/.
|
This variable, ``ansible_group_priority``, can only be set in the inventory source and not in group_vars/ as the variable is used in the loading of group_vars/.
|
||||||
|
|
||||||
|
|
||||||
Another important thing to consider (for all versions) is that connection variables override config, command line and play/role/task specific options and keywords. For example, if your inventory specifies `ansible_ssh_user: ramon` and you run::
|
Another important thing to consider (for all versions) is that connection variables override config, command line and play/role/task specific options and keywords. For example, if your inventory specifies ``ansible_ssh_user: ramon`` and you run::
|
||||||
|
|
||||||
ansible -u lola myhost
|
ansible -u lola myhost
|
||||||
|
|
||||||
|
@ -880,10 +880,10 @@ For plays/tasks this is also true for ``remote_user``. Assuming the same invento
|
||||||
|
|
||||||
- hosts: myhost
|
- hosts: myhost
|
||||||
tasks:
|
tasks:
|
||||||
- command: i'll connect as ramon still
|
- command: I'll connect as ramon still
|
||||||
remote_user: lola
|
remote_user: lola
|
||||||
|
|
||||||
will have the value of `remote_user` overwritten by `ansible_ssh_user` in the inventory.
|
will have the value of ``remote_user`` overwritten by ``ansible_ssh_user`` in the inventory.
|
||||||
|
|
||||||
This is done so host-specific settings can override the general settings. These variables are normally defined per host or group in inventory,
|
This is done so host-specific settings can override the general settings. These variables are normally defined per host or group in inventory,
|
||||||
but they behave like other variables.
|
but they behave like other variables.
|
||||||
|
@ -892,7 +892,7 @@ If you want to override the remote user globally (even over inventory) you can u
|
||||||
|
|
||||||
ansible... -e "ansible_user=maria" -u lola
|
ansible... -e "ansible_user=maria" -u lola
|
||||||
|
|
||||||
the `lola` value is still ignored, but `ansible_user=maria` takes precedence over all other places where `ansible_user` (or `ansible_ssh_user`, or `remote_user`) might be set.
|
the ``lola`` value is still ignored, but ``ansible_user=maria`` takes precedence over all other places where ``ansible_user`` (or ``ansible_ssh_user``, or ``remote_user``) might be set.
|
||||||
|
|
||||||
You can also override as a normal variable in a play::
|
You can also override as a normal variable in a play::
|
||||||
|
|
||||||
|
@ -900,7 +900,7 @@ You can also override as a normal variable in a play::
|
||||||
vars:
|
vars:
|
||||||
ansible_user: lola
|
ansible_user: lola
|
||||||
tasks:
|
tasks:
|
||||||
- command: i'll connect as lola!
|
- command: I'll connect as lola!
|
||||||
|
|
||||||
.. _variable_scopes:
|
.. _variable_scopes:
|
||||||
|
|
||||||
|
@ -1056,5 +1056,3 @@ For information about advanced YAML syntax used to declare variables and have mo
|
||||||
Have a question? Stop by the google group!
|
Have a question? Stop by the google group!
|
||||||
`irc.freenode.net <http://irc.freenode.net>`_
|
`irc.freenode.net <http://irc.freenode.net>`_
|
||||||
#ansible IRC chat channel
|
#ansible IRC chat channel
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue