# Custom Credential injector yml file creation

**URL:** <https://forum.ansible.com/t/custom-credential-injector-yml-file-creation/27380>\
**Category:** AWX Project\
**Tags:** awx\
**Created:** [April 26, 2018, 6:25am UTC](https://forum.ansible.com/t/custom-credential-injector-yml-file-creation/27380 "2018-04-26T06:25:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Eaton](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@Stephen\_Eaton](https://forum.ansible.com/u/Stephen_Eaton)\
**Post date:** [April 26, 2018, 6:25am UTC](https://forum.ansible.com/t/custom-credential-injector-yml-file-creation/27380/1 "2018-04-26T06:25:05Z")

</div>

Hi one and all,

Can custom credential injectors create YAML files?

I’m trying to get an inventory script working ([https://github.com/mattkeeler/ansible-nutanix-inventory](https://github.com/mattkeeler/ansible-nutanix-inventory)) in AWX and it requires a YAML config file. I see that credential injectors can create a file, but the docs are very sparse around this.

Thanks,

Stephen…

---

<div class="post-metadata">

**Author:** ![rpetrell](https://avatars.discourse-cdn.com/v4/letter/r/b4bc9f/32.png) [@rpetrell](https://forum.ansible.com/u/rpetrell)\
**Post date:** [April 26, 2018, 1:02pm UTC](https://forum.ansible.com/t/custom-credential-injector-yml-file-creation/27380/2 "2018-04-26T13:02:27Z")

</div>

Hey Stephen,

You can write whatever file content you like, though there aren’t any helpers for serializing YAML - you’ll have to actually write the YAML content yourself, e.g.,

{  
“file”: {  
“template”: “clusters:\n {{ cluster }}:\n address: {{ address }}\n port: {{ port }}\n username: {{ username }}\n password: {{ password }}”  
},  
“env”: {  
“NUTANIX\_YML\_PATH”: “{{ tower.filename }}”  
}  
}

etc…
