# Dynamic Inventory and ansible\_ssh\_ variables.

**URL:** <https://forum.ansible.com/t/dynamic-inventory-and-ansible-ssh-variables/19061>\
**Category:** Ansible Project\
**Created:** [August 19, 2015, 6:18pm UTC](https://forum.ansible.com/t/dynamic-inventory-and-ansible-ssh-variables/19061 "2015-08-19T18:18:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Luich](https://avatars.discourse-cdn.com/v4/letter/m/91b2a8/32.png) [@Michael\_Luich](https://forum.ansible.com/u/Michael_Luich)\
**Post date:** [August 19, 2015, 6:18pm UTC](https://forum.ansible.com/t/dynamic-inventory-and-ansible-ssh-variables/19061/1 "2015-08-19T18:18:29Z")

</div>

Hello,  
I’m trying to write a custom inventory script that sets a non standard ssh port. I’ve put the ansible\_ssh variables in the \_meta section of the json. These variables don’t seem to get applied. I can set it in /etc/ansible/group\_vars/CDS.yml and it gets picked up. This example only tries to set the port, but my final version will need to set the username and password per host.

The json is available at: [http://pastebin.com/33ySXH6H](http://pastebin.com/33ySXH6H)

Thanks for the help!

Michael Luich
