blob: 6fe288c6046618969783e0a897c3b4c4d0f98374 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
---
- name: Creating the Cloudkitty service and endpoint
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_service
-a "service_name=cloudkitty
service_type=rating
description='OpenStack Rating'
endpoint_region={{ openstack_region_name }}
url='{{ item.url }}'
interface='{{ item.interface }}'
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_cloudkitty_auth }}' }}"
-e "{'openstack_cloudkitty_auth':{{ openstack_cloudkitty_auth }}}"
register: cloudkitty_endpoint
changed_when: "{{ cloudkitty_endpoint.stdout.find('localhost | SUCCESS => ') != -1 and (cloudkitty_endpoint.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: cloudkitty_endpoint.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True
with_items:
- {'interface': 'admin', 'url': '{{ cloudkitty_admin_endpoint }}'}
- {'interface': 'internal', 'url': '{{ cloudkitty_internal_endpoint }}'}
- {'interface': 'public', 'url': '{{ cloudkitty_public_endpoint }}'}
- name: Creating the Cloudkitty project, user, and role
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_user
-a "project=service
user=cloudkitty
password={{ cloudkitty_keystone_password }}
role=admin
region_name={{ openstack_region_name }}
auth={{ '{{ openstack_cloudkitty_auth }}' }}"
-e "{'openstack_cloudkitty_auth':{{ openstack_cloudkitty_auth }}}"
register: cloudkitty_user
changed_when: "{{ cloudkitty_user.stdout.find('localhost | SUCCESS => ') != -1 and (cloudkitty_user.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: cloudkitty_user.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True
- name: Creating the rating role
command: docker exec -t kolla_toolbox /usr/bin/ansible localhost
-m kolla_keystone_role
-a "role={{ cloudkitty_openstack_keystone_default_role }}
auth={{ '{{ openstack_cloudkitty_auth }}' }}"
-e "{'openstack_cloudkitty_auth':{{ openstack_cloudkitty_auth }}}"
register: cloudkitty_role
changed_when: "{{ cloudkitty_role.stdout.find('localhost | SUCCESS => ') != -1 and (cloudkitty_role.stdout.split('localhost | SUCCESS => ')[1]|from_json).changed }}"
until: cloudkitty_role.stdout.split()[2] == 'SUCCESS'
retries: 10
delay: 5
run_once: True
|