Disable privilege escalation (become) and password in playbook

377 views
Skip to first unread message

Edgars

unread,
Mar 31, 2015, 7:25:41 AM3/31/15
to ansible...@googlegroups.com
Hi

I have enabled privilege escalation in ansible.cfg file:

[privilege_escalation]
become
= True
become_ask_pass
= True
become_user
= root
become_method
= su

But now I have one playbook which must run on localhost with connection local and no passwords and now privilege escalations. How to configure that in playbook. Now I have this:

- hosts: localhost
  connection
: local
  become
: no
  sudo
: no
  su
: no

It does not work, when I run playbook it requires it enter password. I tried this

ask-pass: no

But got: 

ERROR: ask-pass is not a legal parameter of an Ansible Play

Also become-ask-pass does not work.

Thanks
Edgars

Brian Coca

unread,
Mar 31, 2015, 8:47:04 AM3/31/15
to ansible...@googlegroups.com
This is not currently a feature, password prompting happens before
playbook is loaded.

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