hi
i have a ansible playbook that uses the “inventory_file” variable in ansible
but in awx/tower this is a tempfile, wich changes.
is there any varibale in awx/tower wich refer to the “name” of the used inventory?
th@x!
hi
i have a ansible playbook that uses the “inventory_file” variable in ansible
but in awx/tower this is a tempfile, wich changes.
is there any varibale in awx/tower wich refer to the “name” of the used inventory?
th@x!
You can use the environment variable INVENTORY_ID in your playbook in conjunction with the tower_inventory module to lookup the inventory record in the AWX API to get the inventory name.
https://docs.ansible.com/ansible/latest/modules/tower_inventory_module.html