pass sudo password in playbook command

1,603 views
Skip to first unread message

cpat...@xervmon.com

unread,
Oct 24, 2013, 6:14:13 AM10/24/13
to ansible...@googlegroups.com
Hi,

I have a playbook(test.yml) which installs some packages on a server.

- name: playbook to install lamp stack
   hosts: test
   user: root
   sudo: yes
   tasks:
     - name: Install Apache
       action: apt pkg=apache2 state=present

Now when I run the playbook using "ansible-playbook -v -i inventory_test test.yml --ask-pass", It asks me for root password and when I give the pass, it works fine.
I would like to know whether there is a way to pass the password in the command itself and not use --ask-pass option.

Thanks,

James Cammarata

unread,
Oct 24, 2013, 1:17:15 PM10/24/13
to ansible...@googlegroups.com
Using --ask-sudo-pass will prompt for a different password specific to sudo.


--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--

James Cammarata <jcamm...@ansibleworks.com>
Sr. Software Engineer, AnsibleWorks, Inc.
http://www.ansibleworks.com/
Reply all
Reply to author
Forward
0 new messages