generate-templates.yml 739 B

1234567891011121314151617181920212223242526
  1. ---
  2. - name: create HOT stack template prefix
  3. register: stack_template_pre
  4. tempfile:
  5. state: directory
  6. prefix: openshift-ansible
  7. - name: set template paths
  8. set_fact:
  9. stack_template_path: "{{ stack_template_pre.path }}/stack.yaml"
  10. user_data_template_path: "{{ stack_template_pre.path }}/user-data"
  11. - name: generate HOT stack template from jinja2 template
  12. template:
  13. src: heat_stack.yaml.j2
  14. dest: "{{ stack_template_path }}"
  15. - name: generate HOT server template from jinja2 template
  16. template:
  17. src: heat_stack_server.yaml.j2
  18. dest: "{{ stack_template_pre.path }}/server.yaml"
  19. - name: generate user_data from jinja2 template
  20. template:
  21. src: user_data.j2
  22. dest: "{{ user_data_template_path }}"