Open ivantomica opened 2 years ago
Hey @ivantomica I think I'm relating to this issue.
Configuration of each dynamic inventory source is done by using following configuration:
Can you point me where we can add this configuration, Because I can't
Can you point me where we can add this configuration, Because I can't find where to put this configuration?
In AWX you create dynamic inventory source by going to
This source can then be scheduled via schedules tab.
So I have to put this 👇 configuration in Source variables field
right!
---
# Set Inventory hostname
hostnames:
- "tag:Name"
- dns-name
...
Thanks @ivantomica , I was confused with the title itself Source variables
.
I wanted to get all the nodes with specific tag. I used Enabled Variable
and Enabled value
but it disabled that particular node in inventory and enable rest. It is kind of inverse that i thought. But this (Source variables
) helped thanks a lot
Has anyone experienced similar issues or have similar use-case as we do? Upgrades to the AWX haven't yet resolved the issue, and I am having hard time pinpointing it.
Any guidance on how to troubleshoot this further would be greatly appreciated.
I'm not facing this issue in awx 0.21.0
Please confirm the following
Summary
Setup I'm working with consists of AWX and a single inventory which has multiple sources consisting of 1 static (sourced from a project) and around 30 dynamic (Amazon EC2) inventory types.
Configuration of each dynamic inventory source is done by using following configuration:
Usually, this configuration works as it should from my perspective, as I get the inventory consisting of:
To have the inventory up-to-date, there are scheduled jobs which trigger during the night and around 3-4-5 inventories get sourced at the time with 15 minute pause in between batches.
Issue I'm experiencing with automatic sync is that not all hosts are grouped under the tag_Ansible_True group, but the behavior is hit'n'miss. Sometimes all hosts are under the tag_Ansible_True group, but most of the time there are only about 40-60 hosts there while there should be much more. When manual sync is trigger by going to Inventories > NAME_OF_THE_INVENTORY -> Sources -> Sync all, all hosts show up under the tag_Ansible_True.
While in "broken state", examining any of the hosts in the inventory that's missing from the tag_Ansible_True group I can see that its tags are properly populated
This points me into direction that something happens during the host grouping phase while they're being grouped and saved into the inventory. Unfortunately, I'm not so familiar with that part of the system and would appreciate further guidance on how to troubleshoot this further.
Multiple curious things happen:
AWX version
19.5.0
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
No response
Steps to reproduce
Expected results
All hosts that have tag Ansible=True are grouped into tag_Ansible_True group
Actual results
Only a subset of hosts that have tag Ansible=True is in tag_Ansible_True Group
Additional information
No response