mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
update
This commit is contained in:
parent
485db56931
commit
2d596b6c4f
@ -502,6 +502,14 @@ $ source environment.1.9.sh
|
||||
|
||||
#### become-user, become
|
||||
In Ansible - to become `sudo` - use the `become` parameter. Use `become_user` to specify the username.
|
||||
```
|
||||
- name: Ensure the httpd service is running
|
||||
service:
|
||||
name: httpd
|
||||
state: started
|
||||
become: true
|
||||
```
|
||||
Note: You may like to execute Ansible with `--ask-sudo-pass` or add the user to sudoers file in order to allow non-supervised execution if you require 'admin' privilages.
|
||||
|
||||
[Read more](http://docs.ansible.com/ansible/latest/become.html)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user