Document: sudo works per-task too
Document that you can use sudo at the task level as well
This commit is contained in:
parent
ce67588dcf
commit
c66b724817
1 changed files with 19 additions and 9 deletions
|
@ -98,6 +98,16 @@ Support for running things from sudo is also available::
|
||||||
user: yourname
|
user: yourname
|
||||||
sudo: yes
|
sudo: yes
|
||||||
|
|
||||||
|
You can also use sudo on a particular task instead of the whole play::
|
||||||
|
|
||||||
|
---
|
||||||
|
- hosts: webservers
|
||||||
|
user: yourname
|
||||||
|
tasks:
|
||||||
|
- service: name=nginx state=started
|
||||||
|
sudo: yes
|
||||||
|
|
||||||
|
|
||||||
You can also login as you, and then sudo to different users than root::
|
You can also login as you, and then sudo to different users than root::
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
Loading…
Reference in a new issue