Remove deprecation warnings from playbook output

2,617 views
Skip to first unread message

German Rincon

unread,
Jul 7, 2021, 1:08:11 PM7/7/21
to AWX Project
Hi,

Is there any way to remove deprecation warnings from the output of the playbooks running inside AXW? I get something like the following:

[DEPRECATION WARNING]: Distribution centos 8 on host R3 should use
6
/usr/libexec/platform-python, but is using /usr/bin/python for backward
7
compatibility with prior Ansible releases. A future Ansible release will
8
default to using the discovered platform python for this host. See https://docs
10
more information. This feature will be removed in version 2.12. Deprecation
11
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.


I tried adding a variable in the Template (deprecation_warnings: False) but it's not working, and I dont know how to reach the global ansible.cfg file.

Thanks!

phil.gr...@gmail.com

unread,
Jul 8, 2021, 6:51:30 AM7/8/21
to AWX Project
This is because of it trying to auto discover the python interpreter. If you want Ansible to continue using /usr/bin/python and not show the warning, you can set ansible_python_interpreter to auto_legacy_silent to silence the warning. Otherwise, you can set it to auto which will have it use /usr/libexec/platform-python in this case.
^^^ That's a specific fix for that issue.

If you want to do it more generally:
https://docs.ansible.com/ansible/latest/reference_appendices/config.html#deprecation-warnings
drop that into a ansible.cfg in the Projects SCM - here's an example : https://github.com/ffirg/workshop_checks/blob/main/ansible.cfg
Reply all
Reply to author
Forward
0 new messages