SUMMARY
Using "sudo_flags" in my ansible.cfg causes the following warning to always be displayed when I run my playbooks:
[DEPRECATION WARNING]: DEFAULT_SUDO_FLAGS option, In favor of become which is a generic framework . This feature
will be removed in version 2.8. Deprecation warnings can be disabled by setting deprecation_warnings=False in
ansible.cfg.
First, I only use "become: yes" in my playbooks already. The only reason why I had to override sudo_flags is to include "-E" so I can git-clone as root but using my local user's ssh key.
I don't think the warning is fair, for lack of better word: there is no other way to specify sudo flags -- become_flags does not exist, or at least I cannot just rename sudo_flags to become_flags and expect everything to work the same way.
ISSUE TYPE
COMPONENT NAME
ansible-playbook
ANSIBLE VERSION
ansible-playbook 2.4.2.0
config file = /Users/davor/projects/monitoring/frb_ansible/ansible.cfg
configured module search path = [u'/Users/davor/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/local/Cellar/ansible/2.4.2.0_1/libexec/lib/python2.7/site-packages/ansible
executable location = /usr/local/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)]
CONFIGURATION
ANSIBLE_SSH_ARGS(XXX/ansible.cfg) = -o ForwardAgent=yes
DEFAULT_MANAGED_STR(XXX/ansible.cfg) = Ansible managed, do not edit directly
DEFAULT_SUDO_FLAGS(XXX/ansible.cfg) = -H -E
DEFAULT_TRANSPORT(XXX/ansible.cfg) = ssh
OS / ENVIRONMENT
macOS 10.12.6
STEPS TO REPRODUCE
Any ansible command: ansible foo -m ping
EXPECTED RESULTS
No warning.
ACTUAL RESULTS
Warning
SUMMARY
Using "sudo_flags" in my ansible.cfg causes the following warning to always be displayed when I run my playbooks:
First, I only use "become: yes" in my playbooks already. The only reason why I had to override
sudo_flagsis to include "-E" so I can git-clone as root but using my local user's ssh key.I don't think the warning is fair, for lack of better word: there is no other way to specify sudo flags --
become_flagsdoes not exist, or at least I cannot just rename sudo_flags to become_flags and expect everything to work the same way.ISSUE TYPE
COMPONENT NAME
ansible-playbook
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
macOS 10.12.6
STEPS TO REPRODUCE
Any ansible command:
ansible foo -m pingEXPECTED RESULTS
No warning.
ACTUAL RESULTS
Warning