73 lines
2.7 KiB
YAML
73 lines
2.7 KiB
YAML
---
|
|
# Copyright 2016, Ian Cordasco
|
|
#
|
|
# 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 set the python interpreter to the ansible runtime venv if
|
|
# the delegation is to localhost so that we get access to the
|
|
# appropriate python libraries in that venv. If the delegation
|
|
# is to another host, we assume that it is accessible by the
|
|
# system python instead.
|
|
|
|
- include_role:
|
|
name: openstack.osa.service_setup
|
|
apply:
|
|
tags:
|
|
- common-service
|
|
- magnum-config
|
|
vars:
|
|
_domain_name: "{{ magnum_trustee_domain_name }}"
|
|
_service_adminuri_insecure: "{{ keystone_service_adminuri_insecure }}"
|
|
_service_setup_host: "{{ magnum_service_setup_host }}"
|
|
_service_setup_host_python_interpreter: "{{ magnum_service_setup_host_python_interpreter }}"
|
|
_service_in_ldap: "{{ magnum_service_in_ldap }}"
|
|
_service_project_name: "{{ magnum_service_project_name }}"
|
|
_service_region: "{{ magnum_service_region }}"
|
|
_service_users: |-
|
|
{% set users = [
|
|
{
|
|
'name': magnum_service_user_name,
|
|
'password': magnum_service_password
|
|
},
|
|
{
|
|
'name': magnum_trustee_domain_admin_name,
|
|
'password': magnum_trustee_password,
|
|
'domain': magnum_trustee_domain_name,
|
|
'project': ''
|
|
}
|
|
]
|
|
%}
|
|
{% for role in magnum_service_role_names %}
|
|
{% set _ = users.append({'name': magnum_service_user_name, 'role': role}) %}
|
|
{% endfor %}
|
|
{% for role in magnum_trustee_domain_admin_roles %}
|
|
{% set _ = users.append({'name': magnum_trustee_domain_admin_name, 'role': role, 'domain': magnum_trustee_domain_name, 'project': ''}) %}
|
|
{% endfor %}
|
|
{{ users }}
|
|
_service_endpoints:
|
|
- service: "{{ magnum_service_name }}"
|
|
interface: "public"
|
|
url: "{{ magnum_service_publicurl }}"
|
|
- service: "{{ magnum_service_name }}"
|
|
interface: "internal"
|
|
url: "{{ magnum_service_internalurl }}"
|
|
- service: "{{ magnum_service_name }}"
|
|
interface: "admin"
|
|
url: "{{ magnum_service_adminurl }}"
|
|
_service_catalog:
|
|
- name: "{{ magnum_service_name }}"
|
|
type: "{{ magnum_service_type }}"
|
|
description: "{{ magnum_service_description }}"
|
|
tags:
|
|
- always
|