main.yml 962 B

123456789101112131415161718192021222324252627282930313233343536
  1. ---
  2. # Ensures all the operator artifacts are created and waits for CSV to succeed.
  3. #
  4. # The following variables must exist:
  5. #
  6. # removed_operators: a list of below dictionaries
  7. # - sub_nspc subscription namespace
  8. # sub_name subscription name
  9. # csv_name CSV name to check for
  10. # pre_cleanup pre-cleanup tasks, a list fqrt to remove (ALL)
  11. # add_cleanup additional CRDs to remove post-uninstall, a list of fqrn
  12. #
  13. # This role must then be applied as:
  14. #
  15. # - include_role:
  16. # name: remove-operators
  17. # vars:
  18. # - role: "{{ item }}"
  19. # loop: "{{ removed_operators }}"
  20. #
  21. - name: Remove any of the resources found
  22. k8s_info:
  23. kubeconfig: tmp/kubeconfig-ocp4
  24. validate_certs: no
  25. #api_version: "{{ item.apiv }}"
  26. kind: "{{ item }}"
  27. #delete_all: true
  28. #state: absent
  29. loop: "{{ role.pre_cleanup }}"
  30. register: removed
  31. - name: debug
  32. debug:
  33. var: removed
  34. ...