From ba5f553f0c545d61cedf5a80ce37d8b0fe30571e Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 7 Jun 2017 14:33:13 -0400 Subject: [PATCH 1/3] fix up scm inventory updates * implicit project updates inherit inv update instance group * added needed settings for SCM group filter and others --- awx/main/tasks.py | 1 + awx/settings/defaults.py | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index d206711cc1..67fe93fc73 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1852,6 +1852,7 @@ class RunInventoryUpdate(BaseTask): _eager_fields=dict( job_type='run', status='running', + instance_group = job.instance_group, celery_task_id=request_id)) # associate the inventory update before calling run() so that a # cancel() call on the inventory update can cancel the project update diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index e4a6d42ad1..cad712bc22 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -822,6 +822,16 @@ CUSTOM_HOST_FILTER = r'^.+$' CUSTOM_EXCLUDE_EMPTY_GROUPS = True #CUSTOM_INSTANCE_ID_VAR = +# --------------------- +# ----- SCM ----- +# --------------------- +#CUSTOM_ENABLED_VAR = +#CUSTOM_ENABLED_VALUE = +SCM_GROUP_FILTER = r'^.+$' +SCM_HOST_FILTER = r'^.+$' +SCM_EXCLUDE_EMPTY_GROUPS = True +#CUSTOM_INSTANCE_ID_VAR = + # --------------------- # -- Activity Stream -- # --------------------- From aeb68f02f62c25b5b2052cb68cdfb0af20f8dc68 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 7 Jun 2017 15:03:53 -0400 Subject: [PATCH 2/3] change settings comments --- awx/settings/defaults.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index cad712bc22..2df269ca33 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -825,12 +825,12 @@ CUSTOM_EXCLUDE_EMPTY_GROUPS = True # --------------------- # ----- SCM ----- # --------------------- -#CUSTOM_ENABLED_VAR = -#CUSTOM_ENABLED_VALUE = +#SCM_ENABLED_VAR = +#SCM_ENABLED_VALUE = SCM_GROUP_FILTER = r'^.+$' SCM_HOST_FILTER = r'^.+$' SCM_EXCLUDE_EMPTY_GROUPS = True -#CUSTOM_INSTANCE_ID_VAR = +#SCM_INSTANCE_ID_VAR = # --------------------- # -- Activity Stream -- From 3dc329bb0f076fd5d7d445e65e0c73747e8e5b94 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Wed, 7 Jun 2017 15:04:44 -0400 Subject: [PATCH 3/3] copy paste fix --- awx/main/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 67fe93fc73..d829fc59a8 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -1852,7 +1852,7 @@ class RunInventoryUpdate(BaseTask): _eager_fields=dict( job_type='run', status='running', - instance_group = job.instance_group, + instance_group = inventory_update.instance_group, celery_task_id=request_id)) # associate the inventory update before calling run() so that a # cancel() call on the inventory update can cancel the project update