File tree 3 files changed +32
-17
lines changed
roles/tower_request/tasks
3 files changed +32
-17
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ teardown: false
5
5
towerinstall : false
6
6
website_information : " "
7
7
dns_information : " No errors with DNS"
8
+ callback_information : " No issue with Ansible Tower callback"
8
9
workshop_type : " "
9
10
dns_type : aws
10
11
valid_dns_type :
Original file line number Diff line number Diff line change 224
224
FAILURES
225
225
*******************
226
226
{{dns_information}}
227
+ {{callback_information}}
227
228
228
229
- name : Print Summary Information
229
230
debug :
Original file line number Diff line number Diff line change 1
1
---
2
- - name : execute a command with tower
3
- uri :
4
- url : https://ansible.rhdemo.io/api/v2/job_templates/22/launch/
5
- validate_certs : no
6
- method : POST
7
- user : public
8
- password : public
9
- status_code : [200, 201]
10
- force_basic_auth : yes
11
- body :
12
- extra_vars :
13
- ec2_name_prefix : " {{ ec2_name_prefix }}"
14
- aws_user : " {{ aws_user }}"
15
- ec2_region : " {{ ec2_region }}"
16
- student_total : " {{ student_total }}"
17
- workshop_type : " {{ workshop_type }}"
18
- body_format : json
2
+ - name : attempt callback to record data
3
+ block :
4
+ - name : execute a command with tower
5
+ uri :
6
+ url : https://ansible.rhdemo.io/api/v2/job_templates/22/launch/
7
+ validate_certs : no
8
+ method : POST
9
+ user : public
10
+ password : public
11
+ status_code : [200, 201]
12
+ force_basic_auth : yes
13
+ body :
14
+ extra_vars :
15
+ ec2_name_prefix : " {{ ec2_name_prefix }}"
16
+ aws_user : " {{ aws_user }}"
17
+ ec2_region : " {{ ec2_region }}"
18
+ student_total : " {{ student_total }}"
19
+ workshop_type : " {{ workshop_type }}"
20
+ body_format : json
21
+ rescue :
22
+ - debug :
23
+ msg : ' Ansible Tower callback has failed, we will fail gracefully'
24
+
25
+ - name : append information to summary
26
+ set_fact :
27
+ callback_information : |
28
+ - Ansible Tower callback failure, this workshop will not be recorded
29
+ run_once : yes
30
+ delegate_to : localhost
31
+ delegate_facts : true
You can’t perform that action at this time.
0 commit comments