Adding field change to readme and example and test of custom messages

This commit is contained in:
John Westcott IV
2020-03-31 11:46:28 -04:00
committed by beeankha
parent 649aafb454
commit eb4db4ed43
3 changed files with 25 additions and 1 deletions

View File

@@ -229,6 +229,7 @@ EXAMPLES = '''
- name: Add Slack notification
tower_notification:
name: slack notification
organization: Default
notification_type: slack
channels:
- general
@@ -236,6 +237,20 @@ EXAMPLES = '''
state: present
tower_config_file: "~/tower_cli.cfg"
- name: Add custom messages to our notification
tower_notification:
name: slack notification
notification_type: slack
organization: Default
messages:
started:
message: "{{ '{{' }} job_friendly_name {{' }}' }} {{ '{{' }} job.id {{' }}' }} started"
success:
message: "{{ '{{' }} job_friendly_name {{ '}}' }} completed in {{ '{{' }} job.elapsed {{ '}}' }} seconds"
error:
message: "{{ '{{' }} job_friendly_name {{ '}}' }} FAILED! Please look at {{ '{{' }} job.url {{ '}}' }}"
tower_config_file: "~/tower_cli.cfg"
- name: Add webhook notification
tower_notification:
name: webhook notification
@@ -319,6 +334,7 @@ EXAMPLES = '''
notification_type: email
state: absent
tower_config_file: "~/tower_cli.cfg"
'''