# Remove deprecation warnings from playbook output

**URL:** <https://forum.ansible.com/t/remove-deprecation-warnings-from-playbook-output/35470>\
**Category:** AWX Project\
**Created:** [July 7, 2021, 5:08pm UTC](https://forum.ansible.com/t/remove-deprecation-warnings-from-playbook-output/35470 "2021-07-07T17:08:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![German\_Rincon](https://avatars.discourse-cdn.com/v4/letter/g/c77e96/32.png) [@German\_Rincon](https://forum.ansible.com/u/German_Rincon)\
**Post date:** [July 7, 2021, 5:08pm UTC](https://forum.ansible.com/t/remove-deprecation-warnings-from-playbook-output/35470/1 "2021-07-07T17:08:11Z")

</div>

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](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!

---

<div class="post-metadata">

**Author:** ![ffirg](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/ffirg/32/10029_2.png) [@ffirg](https://forum.ansible.com/u/ffirg)\
**Post date:** [July 8, 2021, 10:51am UTC](https://forum.ansible.com/t/remove-deprecation-warnings-from-playbook-output/35470/2 "2021-07-08T10:51:30Z")

</div>

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](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](https://github.com/ffirg/workshop_checks/blob/main/ansible.cfg)
