File tree Expand file tree Collapse file tree 2 files changed +11
-29
lines changed
Expand file tree Collapse file tree 2 files changed +11
-29
lines changed Original file line number Diff line number Diff line change 11---
22- name : " Run ci/playbooks/multinode-autohold.yml"
3- hosts : " {{ cifmw_zuul_target_host | default('all') }} "
3+ hosts : controller, primary
44 gather_facts : true
55 tasks :
66 - name : Verify if "success" flag exists after successful tests execution
3737 'autohold'
3838 ] | join('/')
3939 }}
40- ansible.builtin.uri :
41- url : " {{ zuul_autohold_endpoint | default(_zuul_api_url) }}"
42- method : GET
43- headers :
44- Content-Type : " application/json"
45- Accept : " application/json"
46- return_content : yes
47- status_code : 200
48- body_format : json
49- register : autoholds_response
50- retries : 2
51- delay : 10
52- until :
53- - autoholds_response.status is defined
54- - autoholds_response.content_type is defined
55- - autoholds_response.status == 200
56- - " autoholds_response.content_type.startswith('application/json')"
57- ignore_errors : true
40+ cifmw_krb_request_url : " {{ zuul_autohold_endpoint | default(_zuul_api_url) }}"
41+ ansible.builtin.include_role :
42+ name : krb_request
43+ apply :
44+ ignore_errors : true # noqa: ignore-errors
5845
5946 - name : Check if any autohold matches
6047 vars :
6148 autoholds_returned_data : >-
6249 {{
6350 (
64- autoholds_response.content |
65- default('[]') |
66- from_json
67- ) if
68- (
69- (not autoholds_response.failed) and
70- autoholds_response.content_type.startswith('application/json')
71- )
51+ cifmw_krb_request_out.response_json |
52+ default([])
53+ ) if (not cifmw_krb_request_out.failed)
7254 else []
7355 }}
7456 autohold_candidates : >-
Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ def main():
201201 except ValueError as e :
202202 module .fail_json (msg = f"Error with the JSON response: { str (e )} " )
203203
204- if " dest" in module .params :
205- dest = module . params [ "dest" ]
204+ dest = module .params . get ( "dest" , None )
205+ if dest :
206206 if (
207207 os .path .exists (dest )
208208 and os .path .isdir (dest )
You can’t perform that action at this time.
0 commit comments