how do I properly set ANSIBLE_BECOME_PASS ?

1 003 zobrazení
Přeskočit na první nepřečtenou zprávu

Guy Matz

nepřečteno,
1. 5. 2019 14:55:5901.05.19
komu: ansible...@googlegroups.com
Hello!  Sorry to be so lame.  What combination of environment vars do I need to set in order to not get prompted for a SUDO password?!

I've tried setting ANSIBLE_BECOME_PASS and ANSIBLE_ASK_BECOME_PASS=False but I still get prompted . ..  

Thanks,
Guy

James Cassell

nepřečteno,
1. 5. 2019 15:06:5701.05.19
komu: Ansible List
ansible-config dump --only-changed

> Thanks,
> Guy
>

Guy Matz

nepřečteno,
1. 5. 2019 16:27:5501.05.19
komu: ansible...@googlegroups.com
Thanks, but that didn't exactly help.  I'm not able to figure out what I'm missing . . .  any other thoughts?  Thanks again!!!
here's the output from '--only-changed':

DEFAULT_BECOME(/Users/matz/Code/schransible/ansible.cfg) = True
DEFAULT_VAULT_PASSWORD_FILE(/Users/matz/Code/schransible/ansible.cfg) = /Users/matz/.vault_pw
HOST_KEY_CHECKING(/Users/matz/Code/schransible/ansible.cfg) = False

--
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/1556737601.1685335.1669110880.74742216%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

James Cassell

nepřečteno,
1. 5. 2019 17:04:3501.05.19
komu: Ansible List
On Wed, May 1, 2019, at 4:27 PM, Guy Matz wrote:
> Thanks, but that didn't exactly help. I'm not able to figure out what I'm
> missing . . . any other thoughts? Thanks again!!!
> here's the output from '--only-changed':
>
> DEFAULT_BECOME(/Users/matz/Code/schransible/ansible.cfg) = True
> DEFAULT_VAULT_PASSWORD_FILE(/Users/matz/Code/schransible/ansible.cfg) =
> /Users/matz/.vault_pw
> HOST_KEY_CHECKING(/Users/matz/Code/schransible/ansible.cfg) = False
>

There seems to be no environment variable for the become password. You can make your own, though:
export ANSIBLE_BECOME_PASSWORD=mypassword

then in your ansible variables, set:
ansible_become_password: "{{ lookup('env', 'ANSIBLE_BECOME_PASSWORD') }}"


V/r,
James Cassell

Guy Matz

nepřečteno,
2. 5. 2019 12:16:4602.05.19
komu: ansible...@googlegroups.com
YAY!!

--
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.
Odpovědět všem
Odpověď autorovi
Přeposlat
0 nových zpráv