generate-templates.yml 818 B

1234567891011121314151617181920212223242526272829
  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: Print out the Heat template directory
  12. debug: var=stack_template_pre
  13. - name: generate HOT stack template from jinja2 template
  14. template:
  15. src: heat_stack.yaml.j2
  16. dest: "{{ stack_template_path }}"
  17. - name: generate HOT server template from jinja2 template
  18. template:
  19. src: heat_stack_server.yaml.j2
  20. dest: "{{ stack_template_pre.path }}/server.yaml"
  21. - name: generate user_data from jinja2 template
  22. template:
  23. src: user_data.j2
  24. dest: "{{ user_data_template_path }}"