Trigger AWX inventory update on database change
A job running in AWX prevents an inventory sync (of the same inventory). This restricts AWX to run only one job at a time as the inventory is always updated on launch. To prevent this issue, the inventory is updated from AWX when needed. - The update is triggered on any model modification that is used in the inventory (AnsibleGroup, Cname, Domain, Host, Network, NetworkScope) - For Interface, the inventory sync is triggered by the trigger_core_services function as it depends on it - The inventory update job is put on the "high" queue so that it takes precedence over all other jobs. JIRA INFRA-887 #action In Progress
Showing
- app/models.py 75 additions, 11 deletionsapp/models.py
- app/settings.py 3 additions, 0 deletionsapp/settings.py
- app/tasks.py 41 additions, 9 deletionsapp/tasks.py
- app/utils.py 49 additions, 11 deletionsapp/utils.py
- tests/functional/test_models.py 2 additions, 0 deletionstests/functional/test_models.py
Loading
Please register or sign in to comment