ansible-playbook-sudo

22 views
Skip to first unread message

naag...@gmail.com

unread,
Nov 28, 2016, 1:34:33 PM11/28/16
to Ansible Project

Hi,

Can any one please let me know why to use "-sudo" flag in ansible-playbook command line.


ansible-playbook-sudo -i /opt/*/*/ansible/inventories/dev/hosts /opt/*/*/ansible/playbooks/new_deployments.yml --extra-vars "artifact_url=https://*.war  hosts=test1 app_name=welcome"


Thanks

Brian Coca

unread,
Nov 29, 2016, 9:01:13 AM11/29/16
to ansible...@googlegroups.com
First, sudo enables privilege escalation to be used with the tasks in your play, by default this enables and ordinary user to become root using the existing sudo infrastructure in your environment.

Also, it is --sudo and it is an option, not a part of the binary:

ansible-playbook --sudo ...


----------
Brian Coca
Reply all
Reply to author
Forward
0 new messages