Pranav Gaikwad
2020-02-24 3dbf1184139201308685347d38e43ded91d1ee93
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
---
- pause:
    minutes: 3
  when: mig_verify_wait|d('true')
 
- set_fact:
    ansible_python_interpreter: "/opt/virtualenvs/k8s/bin/python"
 
- debug:
    msg: "{{ ansible_python_interpreter }}"
 
- name: "Verifying namespaces"
  k8s_info:
    kind: Namespace
  register: mig_verify_ns
 
- fail:
    msg: "Expected namespaces not found"
  when: item not in (mig_verify_ns | json_query('resources[*].metadata.name'))
  loop: "{{ mig_verify_expected_ns }}"
 
# Leave this as the last task in the playbook.
- name: pre_workload tasks complete
  debug:
    msg: "Pre-Workload tasks completed successfully."
  when: not silent|bool