summaryrefslogtreecommitdiffstats
path: root/roles/openstack-stack/tasks/main.yml
blob: 9835670262ea2542513d8e1bdb647c50978c69cc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---

- name: Generate the templates
  include: generate-templates.yml
  when:
  - stack_state == 'present'

- name: Handle the Stack (create/delete)
  ignore_errors: False
  register: stack_create
  os_stack:
    name: "{{ stack_name }}"
    state: "{{ stack_state }}"
    template: "{{ stack_template_path | default(omit) }}"
    wait: yes

# NOTE(bogdando) OS::Neutron::Subnet doesn't support live updates for
# dns_nameservers, so we can't do that for the "create stack" task.
- include: subnet_update_dns_servers.yaml
  when:
  - private_dns_server is defined
  - stack_state == 'present'

- name: CleanUp
  include: cleanup.yml
  when:
  - stack_state == 'present'