Guillaume Coré
2020-03-11 1d970fbaa4bd88c9d094d9587db59fdf9cd0239a
commit | author | age
6b9f19 1 ---
d84223 2 - import_tasks: detect_project.yml
19e38e 3   when: osp_project_id is not defined
d84223 4
GC 5 # If project exists
19e38e 6 - when: >-
GC 7     osp_project_info | default([]) | length > 0
8     or osp_project_id is defined
d84223 9   block:
365bcc 10     - when: >-
GC 11         osp_project_create | bool
12         or osp_force_delete_all_resources
d84223 13       include_tasks: project_resources.yml
GC 14
15     # Delete the heat stack **after** resources:
16     # The heat stack creates resources like network and router.
17     # Over the course of the lifetime of a project, users may
18     # create instances, ports, etc. that are outside of the heat
19     # stack. If you try to tear the heat stack down without deleting
20     # those extra ports, for instance, the heat stack teardown will fail.
21     - include_tasks: heat.yml
22
23     - when: osp_project_create | bool
24       name: Delete the project
25       include_tasks: project.yml
26
27 # If project doesn't exist
19e38e 28 - when:
GC 29     - osp_project_info | default([]) | length == 0
30     - osp_project_id is not defined
d84223 31   debug:
GC 32     msg: "No project found for {{ osp_project_name }}. Nothing done."