Score:0

disable [DEPRECATION WARNING] on python-version while Ansible execution

de flag

I am getting a DEPRECATION WARNING when running ansible ad-hoc command or executing a playbook like this:

[DEPRECATION WARNING]: Ansible will require Python 3.8 or newer on the controller starting with Ansible 2.12. Current version: 3.6.8 (default, Aug 18
 2020, 08:33:21) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)]. 

how can I disable/surpress that?

Score:3
in flag

Configure your hosts to use a supported version of python.

vrms avatar
de flag
thx for making that point. However, that was not exactly the issue in question. Still it is probably a good idea to keep python fresh, but there may be situations (and that is more or less a scenario I was referring to here) where you have reasons to stay on a python version for a little longer and just do not want to see the WARNING each and every time. Sorry, if I did not make that clear enough.
Score:1
de flag

set deprecation_warnings=False in the [defaults] section of your effective configuration file (i.e. /etc/ansible/ansible.cfg, ~/.ansible.cfg)

in flag
And someday you will be surprised that your playbooks don't work anymore because Ansible was updated. Depreciation notices are there for a reason.
Michael Hampton avatar
cz flag
@GeraldSchneider I wouldn't be surprised. There are so many breaking changes post-2.9 -- which have no warnings at all -- that Red Hat deliberately held back to 2.9 for RHEL 8 and Ansible Tower. Going past 2.9 almost everyone is going to have to make changes to all but the most trivial playbooks and roles.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.