Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add default user role for Keystone & Horizon and tasks to create it
In Keystone v3, the _member_ role is not implicitly created on first use like it is in v2. This patch adds variables to define the default role name for users: - keystone_default_role_name: this is the default role name from Keystone's point of view - horizon_default_role_name: this is the default user role from Horizon's point of view Both Keystone and Horizon's tasks ensure that the role they're using are registered in the Keystone database. To maintain backwards compatibility the default value for both variables is '_member_'. DocImpact Closes-bug: 1474916 Change-Id: Ie01e1771c0b435815dfe55fc0ba9a6d803ebe958 (cherry picked from commit e96a86a)
- Loading branch information
1 parent
734aeee
commit 693016a
Showing
7 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
playbooks/roles/os_horizon/tasks/horizon_service_setup.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
# Copyright 2015, 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. | ||
|
||
|
||
# Add the default user role | ||
- name: Ensure default keystone user role | ||
keystone: | ||
command: "ensure_role" | ||
token: "{{ keystone_auth_admin_token }}" | ||
endpoint: "{{ keystone_service_adminurl }}" | ||
role_name: "{{ horizon_default_role_name }}" | ||
insecure: "{{ keystone_service_adminuri_insecure }}" | ||
when: > | ||
keystone_auth_admin_token is defined | ||
and keystone_service_adminurl is defined | ||
and keystone_service_adminuri_insecure is defined | ||
register: add_member_role | ||
until: add_member_role|success | ||
retries: 5 | ||
delay: 10 | ||
tags: | ||
- horizon-member-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters