summaryrefslogtreecommitdiffstats
path: root/roles/openstack-stack/tasks/generate-templates.yml
blob: 0ff50a095e5113a7ebf1ead3d390c031f50ed796 (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
---
- name: create HOT stack template prefix
  register: stack_template_pre
  tempfile:
    state: directory
    prefix: openshift-ansible

- name: set template paths
  set_fact:
    stack_template_path: "{{ stack_template_pre.path }}/stack.yaml"
    user_data_template_path: "{{ stack_template_pre.path }}/user-data"

- name: generate HOT stack template from jinja2 template
  template:
    src: heat_stack.yaml.j2
    dest: "{{ stack_template_path }}"

- name: generate HOT server template from jinja2 template
  template:
    src: heat_stack_server.yaml.j2
    dest: "{{ stack_template_pre.path }}/server.yaml"

- name: generate user_data from jinja2 template
  template:
    src: user_data.j2
    dest: "{{ user_data_template_path }}"