delete-project.yml 841 B

123456789101112131415161718192021222324252627282930
  1. ---
  2. # Removes the (previously created) ICHP project from the cluster.
  3. #
  4. # Pass variables to this playbook on the command line (-e):
  5. #
  6. # project: the name of the project (role.name)
  7. #
  8. - name: Ensure an ICHP-lookalike project is gone.
  9. hosts: workstation.lab.example.com
  10. gather_subset: min
  11. become: no
  12. tasks:
  13. - name: Ensure that the parameters are specified.
  14. ansible.builtin.assert:
  15. that:
  16. - project is defined
  17. success_msg: "OK, got all parameters, continuing."
  18. fail_msg: "FATAL: You must specify the name of the project to delete using the \"project\" variable."
  19. # Get auth info, and test comms.
  20. - include_role:
  21. name: check-env
  22. - include_role:
  23. name: create-ichp-project
  24. vars:
  25. role:
  26. state: absent
  27. name: "{{ project }}"
  28. ...