Skip to content

Any hints or tricks to use ansible-vault data in config-contexts (when using the nb_inventory for ansible)? #551

Answered by dameonwagner
dameonwagner asked this question in Q&A
Discussion options

You must be logged in to vote

Just in case someone else hits this issue and finds this page while googling for answers:

I've not yet found where the internal inconsistency is, but a simple work around is to have a stupidly simple script, and use that script as the Inventory source for ansible or ansible-playbook. It can be as simple as:

#/bin/bash
ansible-inventory -i netbox_inventory.yml --list 2> /dev/null

which basically fetches the inventory data and hands it directly to ansible-playbook like a hot potato. Why that works, and using ansible-playbook -i netbox_inventory.yml doesn't is still a mystery.

Thankfully, because AWX caches it's inventory, and doesn't fetch it on the fly like when running jobs, it seems una…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dameonwagner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant