openstack-ansible-os_cloudk.../tasks/cloudkitty_domain_setup.yml

106 lines
3.6 KiB
YAML

---
# Copyright 2016, Rackspace US, Inc.
#
# (C) 2016 Michael Rice <michael.rice@rackspace.com>
#
# 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: Ensure cloudkitty rating role
keystone:
command: "ensure_role"
role_name: "rating"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
endpoint: "{{ keystone_service_adminurl }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
tags:
- cloudkitty-domain
- cloudkitty-domain-role
- cloudkitty-domain-setup
- cloudkitty-config
- name: Ensure cloudkitty user
keystone:
command: "ensure_user"
endpoint: "{{ keystone_service_adminurl }}"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
user_name: "{{ cloudkitty_service_user_name }}"
domain_name: "{{ cloudkitty_user_domain_name }}"
password: "{{ cloudkitty_service_password }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
tags:
- cloudkitty-domain
- cloudkitty-domain-setup
- cloudkitty-config
- cloudkitty-command-bin
- name: Add cloudkitty user to service admin role
keystone:
command: "ensure_user_role"
user_name: "{{ cloudkitty_service_user_name }}"
project_name: "service"
role_name: "admin"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
endpoint: "{{ keystone_service_adminurl }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
tags:
- cloudkitty-domain
- cloudkitty-domain-setup
- cloudkitty-config
- cloudkitty-command-bin
- name: Ensure cloudkitty service
keystone:
command: "ensure_service"
service_name: "cloudkitty"
service_type: "rating"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
endpoint: "{{ keystone_service_adminurl }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
tags:
- cloudkitty-domain
- cloudkitty-domain-setup
- cloudkitty-config
- cloudkitty-command-bin
- name: Ensure cloudkitty endpoints
keystone:
command: "ensure_endpoint"
service_name: "cloudkitty"
service_type: "rating"
region_name: "{{ cloudkitty_service_region }}"
endpoint_list:
- url: "{{ cloudkitty_service_publicurl }}"
interface: "public"
- url: "{{ cloudkitty_service_internalurl }}"
interface: "internal"
- url: "{{ cloudkitty_service_adminurl }}"
interface: "admin"
login_user: "{{ keystone_admin_user_name }}"
login_password: "{{ keystone_auth_admin_password }}"
login_project_name: "{{ keystone_admin_tenant_name }}"
endpoint: "{{ keystone_service_adminurl }}"
insecure: "{{ keystone_service_adminuri_insecure }}"
tags:
- cloudkitty-domain
- cloudkitty-domain-setup
- cloudkitty-config
- cloudkitty-command-bin