multiple inventories does not work
Hi,
My Subscription is SEN-12929390.
I have a dynamic inventory script which I include as a git submodule in the directory "inventory". Now I have the need to add some minor variables and would like to do so via your possibility to write inventory directly in the task.
But if I use the fields "Inventory Name" and "Inventory Content" at the same time, "Inventory Name" gets completely ignored as the generated command looks like this( I attached a screenshot ):
"/usr/local/bin/ansible-playbook -i inventoryarea.yml deployment.yml --limit=eimit-258 -e 'ansible_ssh_args=-c aes128-gcm@openssh.com,aes128-ctr -o TCPKeepAlive=yes -o ServerAliveInterval=10 -o ConnectTimeout=20 -o ConnectionAttempts=3'"
but should look like this:
"/usr/local/bin/ansible-playbook -i inventory/ -i inventoryarea.yml deployment.yml --limit=eimit-258 -e 'ansible_ssh_args=-c aes128-gcm@openssh.com,aes128-ctr -o TCPKeepAlive=yes -o ServerAliveInterval=10 -o ConnectTimeout=20 -o ConnectionAttempts=3'"
Could you please look into this, as I really need this.
Comments (8)
-
-
repo owner Hi Jonas,
thanks for reporting the issue ! Will look into it right away !
Julius
-
repo owner Hi Jonas,
so you would like to retain also the old inventory specification and append a secondary specification as far as I understand, correct me if I am wrong.
Julius
-
Hi Julius,
Yes exactly, ansible supports multiple inventories and merges them together, just by specifying them with multiple -i options.
Thanks Jonas
-
repo owner Thank for confirming this, at the moment the inline inventory is designed to exclude the other field usage, but I can change this behavior quite easy.
In order to retain backwards compatibility I think I will have to add a checkbox to trigger the new behavior.
Julius
-
Fine by me, as I have to touch all deployment plans using this feature anyway.
-
repo owner - marked as enhancement
-
repo owner - changed status to resolved
- Log in to comment
Oh I created this issue without logging in...