Setting ansible_sudo_pass in ansible.cfg?

667 views
Skip to first unread message

Simón Muñoz

unread,
Mar 3, 2015, 7:30:36 AM3/3/15
to ansible...@googlegroups.com
Hi all,

is it possible to set ansible_sudo_pass in /etc/ansible/ansible.cfg to avoid having to enter the sudo pass in a group of local clients? 

Thanks in advance, Simon.

Chris Church

unread,
Mar 3, 2015, 1:03:59 PM3/3/15
to ansible...@googlegroups.com
It's not possible in ansible.cfg, but could be set in inventory for all hosts, e.g.

[all]
host1
host2

[all:vars]
ansible_sudo_pass=MakeMeASammich



--
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.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/59c13ea7-1c1f-4fd7-abd0-4eaccdb2aacc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mirko Friedenhagen

unread,
Mar 3, 2015, 2:51:34 PM3/3/15
to ansible-project

Dario Zanzico

unread,
Mar 4, 2015, 12:31:19 AM3/4/15
to ansible...@googlegroups.com
On Tue, Mar 3, 2015, at 01:30 PM, Simón Muñoz wrote:
> Hi all,
>
> is it possible to set ansible_sudo_pass in /etc/ansible/ansible.cfg to
> avoid having to enter the sudo pass in a group of local clients?

i think you can set it in the inventory:
[all:vars]
ansible_sudo_pass=

> Thanks in advance, Simon.

dario
Reply all
Reply to author
Forward
0 new messages