Matt Thompson 51f1a3aded Add heat_stack_user role
In issue #195 @miguelgrinberg points out that we need a heat_stack_user
role which is assigned to keystone users created by stacks themselves.
This change adds that user and also moves some of the tasks in the
heat_domain_user role to heat_common, where they are better suited.
2014-10-01 10:50:56 +01:00

54 lines
1.8 KiB
YAML

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# We add the keystone role used by heat to delegate to the heat service user
# (for performing deferred operations via trusts)
- name: Ensure stack_owner role
keystone: >
command=ensure_role
login_tenant_name="{{ auth_admin_tenant }}"
login_user="{{ auth_admin_username }}"
login_password="{{ auth_admin_password }}"
endpoint="{{ auth_admin_uri }}"
role_name="heat_stack_owner"
# Any user creating stacks needs to have the 'heat_stack_owner' role assigned,
# we add to admin user here for testing purposes
- name: Ensure admin has stack_owner role
keystone: >
command=ensure_user_role
login_tenant_name="{{ auth_admin_tenant }}"
login_user="{{ auth_admin_username }}"
login_password="{{ auth_admin_password }}"
endpoint="{{ auth_admin_uri }}"
user_name="admin"
tenant_name="admin"
role_name="heat_stack_owner"
- name: Setup Heat Config
template: >
src={{ item }}
dest=/etc/heat/{{ item }}
owner={{ system_user }}
group={{ system_group }}
with_items:
- heat.conf
- environment.d/default.yaml
- templates/AWS_CloudWatch_Alarm.yaml
- templates/AWS_RDS_DBInstance.yaml
- api-paste.ini
- policy.json
notify: Restart os service