diff options
author | Ryan Cook <rcook@redhat.com> | 2017-06-16 10:27:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-16 10:27:41 -0700 |
commit | aa0c8c910a0b8c29afb83d1562c252affcd4a2cb (patch) | |
tree | fbde420c20e6f18fcc8063e268a1525f8848c8d0 /roles/openstack-stack/tasks | |
parent | 7ba2ef768b25b99f628c88a8e6348a8d0df630a0 (diff) | |
parent | 9369c9dfd722e697f83a225d78c2c1dcd1247976 (diff) | |
download | openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.gz openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.bz2 openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.tar.xz openshift-aa0c8c910a0b8c29afb83d1562c252affcd4a2cb.zip |
Merge pull request #466 from tomassedovic/openstack-provider
Openstack provider
Diffstat (limited to 'roles/openstack-stack/tasks')
-rw-r--r-- | roles/openstack-stack/tasks/main.yml | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/roles/openstack-stack/tasks/main.yml b/roles/openstack-stack/tasks/main.yml new file mode 100644 index 000000000..71c7bbe0d --- /dev/null +++ b/roles/openstack-stack/tasks/main.yml @@ -0,0 +1,41 @@ +--- +- name: create HOT stack template prefix + register: stack_template_pre + tempfile: + state: directory + prefix: casl-ansible + +- name: set template paths + set_fact: + stack_template_path: "{{ stack_template_pre.path }}/stack.yaml" + server_template_path: "{{ stack_template_pre.path }}/server.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: "{{ server_template_path }}" + +- name: generate user_data from jinja2 template + template: + src: user_data.j2 + dest: "{{ user_data_template_path }}" + +- name: create stack + ignore_errors: False + register: stack_create + os_stack: + name: "{{ stack_name }}" + state: present + template: "{{ stack_template_path }}" + wait: yes + +- name: cleanup temp files + file: + path: "{{ stack_template_pre.path }}" + state: absent |