I’m in the middle of migrating our Ansible projects to 2.5. Specifically, moving to the new network_cli connection module.
So far, everything is working well, except using the become
framework. The short of it is, in ansible.cfg
, ask_sudo_pass = True
has the desired effect of prompting for a become password, and defaulting an empty response to the SSH password. However, this throws a depreciation warning.
When attempting to use the new hotness, neither ask_become_pass = True
nor become_ask_pass = True
have the desired effect.
Am I missing something?
ansible-playbook --version
ansible-playbook 2.5.0
config file = /Users/XXXX/projects/ansible/ansible.cfg
configured module search path = [u’/Users/XXXX/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]
ansible python module location = /Users/XXXX/projects/ansible/venv/lib/python2.7/site-packages/ansible
executable location = /Users/XXXX/projects/ansible/venv/bin/ansible-playbook
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]
ansible.cfg
[defaults]
inventory = ./bin/inventory
host_key_checking = False
accelerate_timeout = 60
timeout = 30
ask_pass = True
ask_become_pass = True # What I /think/ should be used
become_ask_pass = True # …the documentation is vague
ask_sudo_pass = True . # Works without fail
[persistent_connection]
command_timeout = 30
Command execution:
ansible-playbook playbook.yml
Thanks,
Matthew