Any hints or tricks to use ansible-vault data in config-contexts (when using the nb_inventory for ansible)? #551
-
Hi, We're in the process of moving to use netbox as an inventory source for ansible (and AWX), and are 99% of the way to completing the migration. I've stumbled on a snag though, which is
Which when translated into JSON (using the output of
So far all good, running
When running
However, if I collect the output of
So the data is good and well-formed. Which is where I get rather confused... Are there any known issues, or formatting tips, to make this mechanism work? Thanks in advance. Dameon. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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
which basically fetches the inventory data and hands it directly to Thankfully, because AWX caches it's inventory, and doesn't fetch it on the fly like when running jobs, it seems unaffected by this oddity. While it's only a workaround (which leaves me feeling somewhat unsatisfied, as I'd like to get to the bottom of it), I'd say this discussion can be put out to pasture. |
Beta Was this translation helpful? Give feedback.
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
oransible-playbook
. It can be as simple as:which basically fetches the inventory data and hands it directly to
ansible-playbook
like a hot potato. Why that works, and usingansible-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…