diff options
author | liyuenan <liyuenan@huawei.com> | 2017-02-12 17:26:28 +0800 |
---|---|---|
committer | liyuenan <liyuenan@huawei.com> | 2017-02-13 16:10:11 +0800 |
commit | 76936c6ecd32033562e10589fb44e7d1cb204e79 (patch) | |
tree | 66d6b85988cb334055e108e526fa28e34c2230fa /deploy/adapters/ansible/roles/heat | |
parent | d4a90ad0ff4930f4853dc47dd11619a92a1fb1dd (diff) |
Fix create stack failed
JIRA: COMPASS-523
Heat needs grant heat admin role and create a menber role, otherwise
functest smoke test will failed when create stack by heat.
Change-Id: I925b473861bf82becf119bfd490c38732814c336
Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/heat')
-rw-r--r-- | deploy/adapters/ansible/roles/heat/tasks/heat_install.yml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml index 2803a3e6..ef50ec52 100644 --- a/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml +++ b/deploy/adapters/ansible/roles/heat/tasks/heat_install.yml @@ -23,23 +23,32 @@ name: heat state: present description: "Stack projects and users" + register: heat_domain when: inventory_hostname == groups['controller'][0] - name: create heat user os_user: cloud: opnfv domain: heat - name: heat_domain_user + name: heat_domain_admin password: "{{ HEAT_PASS }}" when: inventory_hostname == groups['controller'][0] +- name: grant heat admin role + shell: | + . /opt/admin-openrc.sh + openstack role assignment list | grep "{{ heat_domain.id }}" \ + || openstack role add --domain heat --user-domain heat \ + --user heat_domain_admin admin; + when: inventory_hostname == groups['controller'][0] + - name: create heat role os_keystone_role: cloud: opnfv name: heat_stack_owner when: inventory_hostname == groups['controller'][0] -- name: grant heat role +- name: grant heat demo role os_user_role: cloud: opnfv user: demo @@ -47,6 +56,12 @@ role: heat_stack_owner when: inventory_hostname == groups['controller'][0] +- name: create member role + os_keystone_role: + cloud: opnfv + name: _member_ + when: inventory_hostname == groups['controller'][0] + - name: update heat conf template: src=heat.j2 dest=/etc/heat/heat.conf |