mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Update doc to use 'become' instead of 'sudo'
This commit is contained in:
parent
7f0cd14e0f
commit
2fb98152ad
1 changed files with 6 additions and 0 deletions
|
@ -85,6 +85,12 @@ If you would like to access sudo mode, there are also flags to do that:
|
||||||
# as bruce, sudoing to batman
|
# as bruce, sudoing to batman
|
||||||
$ ansible all -m ping -u bruce --sudo --sudo-user batman
|
$ ansible all -m ping -u bruce --sudo --sudo-user batman
|
||||||
|
|
||||||
|
# With latest version of ansible `sudo` is deprecated so use become
|
||||||
|
# as bruce, sudoing to root
|
||||||
|
$ ansible all -m ping -u bruce -b
|
||||||
|
# as bruce, sudoing to batman
|
||||||
|
$ ansible all -m ping -u bruce -b --become-user batman
|
||||||
|
|
||||||
(The sudo implementation is changeable in Ansible's configuration file if you happen to want to use a sudo
|
(The sudo implementation is changeable in Ansible's configuration file if you happen to want to use a sudo
|
||||||
replacement. Flags passed to sudo (like -H) can also be set there.)
|
replacement. Flags passed to sudo (like -H) can also be set there.)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue