fixed formatting

pull/44979/head
Sandra McCann 6 years ago
parent ea04930ecd
commit 58ca82fa1c

@ -869,7 +869,7 @@ Basically, anything that goes into "role defaults" (the defaults folder inside t
This last one can be superceeded by the user via ``ansible_group_priority``, which defaults to ``1`` for all groups.
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
@ -879,10 +879,10 @@ For plays/tasks this is also true for ``remote_user``. Assuming the same invento
- hosts: myhost
tasks:
- command: i'll connect as ramon still
- command: I'll connect as ramon still
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,
but they behave like other variables.
@ -891,7 +891,7 @@ If you want to override the remote user globally (even over inventory) you can u
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::
@ -899,7 +899,7 @@ You can also override as a normal variable in a play::
vars:
ansible_user: lola
tasks:
- command: i'll connect as lola!
- command: I'll connect as lola!
.. _variable_scopes:
@ -1053,5 +1053,3 @@ For information about advanced YAML syntax used to declare variables and have mo
Have a question? Stop by the google group!
`irc.freenode.net <http://irc.freenode.net>`_
#ansible IRC chat channel

Loading…
Cancel
Save