12345678910111213141516171819202122232425262728293031323334353637 |
- ---
- - name: Clean up after the strategies exercise
- hosts: workstation.lab.example.com
- gather_subset: min
- become: no
- vars:
- ge_nsp: deployments-stateful
- tasks:
- - name: Make sure kubeconfig is there on utility
- delegate_to: utility.lab.example.com
- file:
- path: /home/lab/{{ item }}/auth/kubeconfig
- state: file
- loop: "{{ clusters }}"
- - name: Create a temp dir
- file:
- path: tmp
- state: directory
- - name: Copy over the kubeconfig
- delegate_to: utility.lab.example.com
- fetch:
- src: /home/lab/{{ item }}/auth/kubeconfig
- dest: tmp/kubeconfig-{{ item }}
- flat: yes
- loop: "{{ clusters }}"
- - name: Ensure the namespace for the exercise is gone
- k8s:
- kubeconfig: tmp/kubeconfig-ocp4
- validate_certs: no
- api_version: v1
- kind: namespace
- name: "{{ ge_nsp }}"
- state: absent
- ...
|