diff options
Diffstat (limited to 'deploy/adapters/ansible/roles/heat/tasks')
-rw-r--r-- | deploy/adapters/ansible/roles/heat/tasks/heat_config.yml | 9 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/heat/tasks/heat_install.yml | 19 | ||||
-rw-r--r-- | deploy/adapters/ansible/roles/heat/tasks/main.yml | 14 |
3 files changed, 42 insertions, 0 deletions
diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_config.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_config.yml new file mode 100644 index 00000000..739d1aae --- /dev/null +++ b/deploy/adapters/ansible/roles/heat/tasks/heat_config.yml @@ -0,0 +1,9 @@ +--- +- name: heat db sync + shell: su -s /bin/sh -c "heat-manage db_sync" heat + ignore_errors: True + notify: + - restart heat service + +- meta: flush_handlers + diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml new file mode 100644 index 00000000..ab23f873 --- /dev/null +++ b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml @@ -0,0 +1,19 @@ +--- +- include_vars: "{{ ansible_os_family }}.yml" + +- name: install heat related packages + action: "{{ ansible_pkg_mgr }} name={{ item }} state=present" + with_items: packages | union(packages_noarch) + +- name: generate heat service list + shell: echo {{ item }} >> /opt/service + with_items: services | union(services_noarch) + +- name: update heat conf + template: src=heat.j2 + dest=/etc/heat/heat.conf + backup=yes + notify: + - restart heat service + - remove heat-sqlite-db + diff --git a/deploy/adapters/ansible/roles/heat/tasks/main.yml b/deploy/adapters/ansible/roles/heat/tasks/main.yml new file mode 100644 index 00000000..cf259eb5 --- /dev/null +++ b/deploy/adapters/ansible/roles/heat/tasks/main.yml @@ -0,0 +1,14 @@ +--- +- include: heat_install.yml + tags: + - install + - heat_install + - heat + +- include: heat_config.yml + when: HA_CLUSTER is not defined or HA_CLUSTER[inventory_hostname] == '' + tags: + - config + - heat_config + - heat + |