ansible-playbook-sudo

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

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 …