diff options
author | sirkubax <muszynski@so1.net> | 2018-01-01 22:07:51 +0100 |
---|---|---|
committer | sirkubax <muszynski@so1.net> | 2018-01-01 22:07:51 +0100 |
commit | 2d596b6c4f1eda1bdf906c84110da5c84ce69e39 (patch) | |
tree | fdab51c000931cac854cac4d0b806f39d783b3c4 | |
parent | 485db56931ea13d7be17a08aa0e97ba32228afb9 (diff) |
update
-rw-r--r-- | ansible.html.markdown | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible.html.markdown b/ansible.html.markdown index 76d03ede..b83fb0c1 100644 --- a/ansible.html.markdown +++ b/ansible.html.markdown @@ -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) |