Files

74 lines
2.4 KiB
YAML

---
# Copyright (c) 2016 Intel Corporation
#
# 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.
- name: Create CIAO OpenStack Services
keystone:
login_user: admin
login_password: "{{ keystone_admin_password }}"
login_project_name: "admin"
command: "ensure_service"
service_name: "{{ item.service }}"
service_type: "{{ item.type }}"
description: "{{ item.description | default('') }}"
endpoint: "https://{{ keystone_fqdn }}:35357/v3"
insecure: yes
with_items: "{{ ciao_openstack_services }}"
- name: Create CIAO OpenStack Endpoints
keystone:
login_user: admin
login_password: "{{ keystone_admin_password }}"
login_project_name: "admin"
command: "ensure_endpoint"
region_name: "RegionOne"
service_name: "{{ item.service }}"
service_type: "{{ item.type }}"
endpoint_list:
- url: "{{ item.public_url }}"
interface: "public"
- url: "{{ item.internal_url }}"
interface: "internal"
- url: "{{ item.admin_url }}"
interface: "admin"
endpoint: "https://{{ keystone_fqdn }}:35357/v3"
insecure: yes
with_items: "{{ ciao_openstack_endpoints }}"
- name: Create CIAO service user for OpenStack
keystone:
login_user: admin
login_password: "{{ keystone_admin_password }}"
login_project_name: "admin"
command: "ensure_user"
user_name: "{{ ciao_service_user }}"
project_name: "service"
password: "{{ ciao_service_password }}"
domain_name: "Default"
email: "{{ ciao_admin_email }}"
endpoint: "https://{{ keystone_fqdn }}:35357/v3"
insecure: yes
- name: Add CIAO service user to admin role
keystone:
login_user: admin
login_password: "{{ keystone_admin_password }}"
login_project_name: "admin"
command: "ensure_user_role"
user_name: "{{ ciao_service_user }}"
project_name: "service"
role_name: "admin"
endpoint: "https://{{ keystone_fqdn }}:35357/v3"
insecure: yes