|
@@ -31,7 +31,7 @@
|
|
|
- name: reset the above fact if not the case
|
|
|
set_fact:
|
|
|
csv_is_there: false
|
|
|
- when: (csv is not defined) or (csv.resources | length == 0) or (csv.resources[0].status.phase != "Succeeded")
|
|
|
+ when: (csv is not defined) or (csv.resources is not defined) or (csv.resources | length == 0) or (csv.resources[0].status.phase != "Succeeded")
|
|
|
|
|
|
- name: is there a central pod?
|
|
|
k8s_info:
|
|
@@ -51,7 +51,7 @@
|
|
|
- name: reset the above fact if not the case
|
|
|
set_fact:
|
|
|
central_is_there: false
|
|
|
- when: (central is not defined) or (central.resources | length == 0) or (central.resources[0].status.phase != "Running")
|
|
|
+ when: (central is not defined) or (central.resources is not defined) or (central.resources | length == 0) or (central.resources[0].status.phase != "Running")
|
|
|
|
|
|
#- name: is there anyone home at the api endpoint?
|
|
|
|
|
@@ -152,7 +152,7 @@
|
|
|
force_basic_auth: true
|
|
|
return_content: true
|
|
|
validate_certs: false
|
|
|
- url: "https://{{ central_ep }}/v1/apitokens"
|
|
|
+ url: "https://{{ central_ep }}/v1/apitokens?revoked=false"
|
|
|
url_username: admin
|
|
|
url_password: "{{ central_pass | string | b64decode }}"
|
|
|
headers:
|
|
@@ -180,7 +180,7 @@
|
|
|
copy:
|
|
|
dest: "{{ ansible_facts['user_dir'] }}/api-token"
|
|
|
content: "{{ api_token.json.token }}"
|
|
|
- when: not api_token.skipped
|
|
|
+ when: (api_token.skipped is not defined) or (not api_token.skipped)
|
|
|
|
|
|
#- name: take a policy backup (for later)
|
|
|
## XXX can't delete system policies XXX
|