File tree Expand file tree Collapse file tree 3 files changed +51
-38
lines changed Expand file tree Collapse file tree 3 files changed +51
-38
lines changed Original file line number Diff line number Diff line change 1
- * .pyc
1
+ * .pyc
2
+
3
+ /tower_collection_actual.yml
Original file line number Diff line number Diff line change
1
+ - name: Launch a Job Template
2
+ {{ collection_id }}.tower_job_launch:
3
+ job_template: "Demo Job Template"
4
+ register: job
5
+
6
+ - assert:
7
+ that:
8
+ - "job is changed"
9
+ - "job.status == 'pending'"
10
+
11
+ - name: List jobs w/ a matching primary key
12
+ {{ collection_id }}.tower_job_list:
13
+ query:
14
+ id: "{{ '{{' }} job.id {{ '}}' }}"
15
+ register: matching_jobs
16
+
17
+ - assert:
18
+ that:
19
+ - "{{ '{{' }} matching_jobs.count {{ '}}' }} == 1"
20
+
21
+ - name: List failed jobs (which don't exist)
22
+ {{ collection_id }}.tower_job_list:
23
+ status: failed
24
+ query:
25
+ id: "{{ '{{' }} job.id {{ '}}' }}"
26
+ register: successful_jobs
27
+
28
+ - assert:
29
+ that:
30
+ - "{{ '{{' }} successful_jobs.count {{ '}}' }} == 0"
31
+
32
+ - name: Get ALL result pages!
33
+ {{ collection_id }}.tower_job_list:
34
+ all_pages: True
35
+ register: all_page_query
36
+
37
+ - assert:
38
+ that:
39
+ - 'not all_page_query.next'
Original file line number Diff line number Diff line change 3
3
gather_facts : false
4
4
vars :
5
5
collection_id : awx.awx
6
- collections :
7
- - " {{ collection_id }}"
8
6
tasks :
9
- - name : Launch a Job Template
10
- tower_job_launch :
11
- job_template : " Demo Job Template "
12
- register : job
7
+ - name : " Create playbook to call with collection FQCN "
8
+ template :
9
+ src : tower_collection_smoke.j2
10
+ dest : tower_collection_actual.yml
13
11
14
- - assert :
15
- that :
16
- - " job is changed"
17
- - " job.status == 'pending'"
12
+ - include : tower_collection_actual.yml
18
13
19
- - name : List jobs w/ a matching primary key
20
- tower_job_list :
21
- query : {"id": "{{ job.id }}"}
22
- register : matching_jobs
23
-
24
- - assert :
25
- that :
26
- - " {{ matching_jobs.count }} == 1"
27
-
28
- - name : List failed jobs (which don't exist)
29
- tower_job_list :
30
- status : failed
31
- query : {"id": "{{ job.id }}"}
32
- register : successful_jobs
33
-
34
- - assert :
35
- that :
36
- - " {{ successful_jobs.count }} == 0"
37
-
38
- - name : Get ALL result pages!
39
- tower_job_list :
40
- all_pages : True
41
- register : all_page_query
42
-
43
- - assert :
44
- that :
45
- - ' not all_page_query.next'
14
+ - name : " Delete dynamic playbook"
15
+ file :
16
+ path : tower_collection_actual.yml
17
+ state : absent
You can’t perform that action at this time.
0 commit comments