# {{inventory\_file}} YAML converted to Python

**URL:** <https://forum.ansible.com/t/inventory-file-yaml-converted-to-python/29113>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [November 25, 2018, 5:30pm UTC](https://forum.ansible.com/t/inventory-file-yaml-converted-to-python/29113 "2018-11-25T17:30:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ilya\_Kharlamov](https://avatars.discourse-cdn.com/v4/letter/i/839c29/32.png) [@Ilya\_Kharlamov](https://forum.ansible.com/u/Ilya_Kharlamov)\
**Post date:** [November 25, 2018, 5:30pm UTC](https://forum.ansible.com/t/inventory-file-yaml-converted-to-python/29113/1 "2018-11-25T17:30:38Z")

</div>

Dear all

I have a simple playbook that prints a yaml file:

- hosts: hosts: myhost

tasks:

- name: show\_inventory\_file

shell: ‘ **cat {{inventory\_file}}** ’

register: inventory\_file\_yaml

- debug:

msg: ‘ **{{ inventory\_file\_yaml.stdout }}** ’

when I run it through CLI ansible-playbook -i myinventory.yaml, everything seems to be fine, the format is yaml:

ok: [localhost] =\> {

“msg”: "all:\n# hosts:\n’…

however if I run the same playbook via AWX using the same inventory yaml,

ok: [localhost] =\> {

“msg”: "#! /usr/bin/env python\n# -\*- coding: utf-8…

So AWX converts yaml inventory to python format automatically

Is there any way to force AWX to make {{inventory\_file}} work in AWX the same as when running through ansible-playbook CLI,

i.e. keep the original yaml format, do not convert the inventory to python format?
