Remove deprecation warnings from playbook output

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

9
.ansible.com/ansible/2.11/reference_appendices/interpreter_discovery.html for

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!

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-warningsdrop that into a ansible.cfg in the Projects SCM - here’s an example : https://github.com/ffirg/workshop_checks/blob/main/ansible.cfg