diff --git a/awx/ui/client/src/templates/job-template.form.js b/awx/ui/client/src/templates/job-template.form.js index 732bc5767e..bf0e911b65 100644 --- a/awx/ui/client/src/templates/job-template.form.js +++ b/awx/ui/client/src/templates/job-template.form.js @@ -322,6 +322,18 @@ function(NotificationsList, CompletedJobsList, i18n) { dataContainer: "body", labelClass: 'stack-inline', ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)' + }, { + name: 'store_facts', + label: i18n._('Store Ansible Facts'), + type: 'checkbox', + column: 2, + awPopOver: "
" + i18n._("If enabled, a fact scan will be done when this job is launched.") + "
", + dataPlacement: 'right', + dataTitle: i18n._('Store Ansible Facts'), + dataContainer: "body", + labelClass: 'stack-inline', + ngDisabled: '!(job_template_obj.summary_fields.user_capabilities.edit || canAddJobTemplate)', + ngShow: "!job_type.value || job_type.value === 'run'" }] }, callback_url: { diff --git a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js index 735dc4d421..f5b640c528 100644 --- a/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js +++ b/awx/ui/client/src/templates/job_templates/add-job-template/job-template-add.controller.js @@ -413,6 +413,10 @@ $scope.survey_enabled = false; } + if($scope.job_type.value !== "run") { + $scope.store_facts = null; + } + generator.clearApiErrors($scope); Wait('start');