main.yml 1002 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 rtypes to remove (ALL)
  11. # - apiv
  12. # kind
  13. # add_cleanup additional CRDs to remove post-uninstall, a list of fqrn
  14. #
  15. # This role must then be applied as:
  16. #
  17. # - include_role:
  18. # name: remove-operators
  19. # vars:
  20. # - role: "{{ item }}"
  21. # loop: "{{ removed_operators }}"
  22. #
  23. - name: Remove any of the resources found
  24. k8s_info:
  25. kubeconfig: tmp/kubeconfig-ocp4
  26. validate_certs: no
  27. api_version: "{{ item.apiv }}"
  28. kind: "{{ item.kind }}"
  29. #delete_all: true
  30. #state: absent
  31. loop: "{{ role.pre_cleanup }}"
  32. register: removed
  33. - name: debug
  34. debug:
  35. var: removed
  36. ...