strategy-finish.yml 902 B

1234567891011121314151617181920212223242526272829303132333435
  1. ---
  2. - name: Clean up after the strategies exercise
  3. hosts: workstation.lab.example.com
  4. gather_subset: min
  5. become: no
  6. tasks:
  7. - name: Make sure kubeconfig is there on utility
  8. delegate_to: utility.lab.example.com
  9. file:
  10. path: /home/lab/{{ item }}/auth/kubeconfig
  11. state: file
  12. loop: "{{ clusters }}"
  13. - name: Create a temp dir
  14. file:
  15. path: tmp
  16. state: directory
  17. - name: Copy over the kubeconfig
  18. delegate_to: utility.lab.example.com
  19. fetch:
  20. src: /home/lab/{{ item }}/auth/kubeconfig
  21. dest: tmp/kubeconfig-{{ item }}
  22. flat: yes
  23. loop: "{{ clusters }}"
  24. - name: Ensure the namespace for the exercise is gone
  25. k8s:
  26. kubeconfig: tmp/kubeconfig-ocp4
  27. validate_certs: no
  28. api_version: v1
  29. kind: namespace
  30. name: deployments-strategy
  31. state: absent
  32. ...