update organizations and approvals

This commit is contained in:
excalibrax
2020-05-13 20:33:23 -05:00
parent b41a55f297
commit ca0130fc64
2 changed files with 72 additions and 1 deletions

View File

@@ -128,6 +128,11 @@ options:
- list of notifications to send on error
type: list
elements: str
notification_templates_approvals:
description:
- list of notifications to send on start
type: list
elements: str
extends_documentation_fragment: awx.awx.auth
'''
@@ -173,6 +178,7 @@ def main():
notification_templates_started=dict(type="list", elements='str'),
notification_templates_success=dict(type="list", elements='str'),
notification_templates_error=dict(type="list", elements='str'),
notification_templates_approvals=dict(type="list", elements='str'),
state=dict(choices=['present', 'absent'], default='present'),
)
@@ -242,6 +248,12 @@ def main():
for item in notifications_error:
association_fields['notification_templates_error'].append(module.resolve_name_to_id('notification_templates', item))
notifications_approval = module.params.get('notification_templates_approvals')
if notifications_approval is not None:
association_fields['notification_templates_approvals'] = []
for item in notifications_approval:
association_fields['notification_templates_approvals'].append(module.resolve_name_to_id('notification_templates', item))
on_change = None
new_spec = module.params.get('survey')
if new_spec: