summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/keystone
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible/roles/keystone')
-rwxr-xr-xdeploy/adapters/ansible/roles/keystone/handlers/main.yml2
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml4
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml33
-rw-r--r--deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml4
-rw-r--r--deploy/adapters/ansible/roles/keystone/vars/main.yml27
5 files changed, 52 insertions, 18 deletions
diff --git a/deploy/adapters/ansible/roles/keystone/handlers/main.yml b/deploy/adapters/ansible/roles/keystone/handlers/main.yml
index 608a8a09..82c1a553 100755
--- a/deploy/adapters/ansible/roles/keystone/handlers/main.yml
+++ b/deploy/adapters/ansible/roles/keystone/handlers/main.yml
@@ -9,4 +9,4 @@
---
- name: restart keystone services
service: name={{ item }} state=restarted enabled=yes
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
index ea211470..33892c5f 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_config.yml
@@ -41,7 +41,7 @@
--delete \
/etc/keystone/fernet-keys \
root@{{ hostvars[ item ].ansible_eth0.ipv4.address }}:/etc/keystone/
- with_items: groups['controller'][1:]
+ with_items: "{{ groups['controller'][1:] }}"
notify:
- restart keystone services
@@ -74,7 +74,7 @@
--delete \
/etc/keystone/credential-keys \
root@{{ hostvars[ item ].ansible_eth0.ipv4.address }}:/etc/keystone/
- with_items: groups['controller'][1:]
+ with_items: "{{ groups['controller'][1:] }}"
notify:
- restart keystone services
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
index 53077776..ab71fab4 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml
@@ -23,6 +23,10 @@
--url {{ item.adminurl }} \
$(openstack endpoint list | grep keystone | grep admin | awk '{print $2}');
with_items: "{{ os_services[0:1] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add service
shell:
@@ -32,12 +36,20 @@
--description "{{ item.description }}" \
{{ item.type }}
with_items: "{{ os_services[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add project
shell:
. /opt/admin-openrc.sh;
openstack project create --description "Service Project" service;
openstack project create --domain default --description "Demo Project" demo;
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: set admin user
shell:
@@ -50,6 +62,10 @@
{{ item.user }}
with_items: "{{ os_users }}"
when: item["user"] == "admin"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add user
shell:
@@ -61,6 +77,10 @@
--password "{{ item.password }}" \
{{ item.user }}
with_items: "{{ os_users[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add roles
shell:
@@ -68,6 +88,10 @@
openstack role create {{ item.role }}
with_items: "{{ os_users }}"
when: item["user"] == "demo"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: grant roles
shell:
@@ -77,6 +101,10 @@
--user "{{ item.user }}" \
{{ item.role }}
with_items: "{{ os_users }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
- name: add endpoints
shell:
@@ -91,3 +119,8 @@
--region {{ item.region }} \
{{ item.name }} admin {{ item.adminurl }};
with_items: "{{ os_services[1:] }}"
+ register: result
+ until: result.rc == 0
+ retries: 10
+ delay: 5
+
diff --git a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
index 757349c5..0d3161ed 100644
--- a/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
+++ b/deploy/adapters/ansible/roles/keystone/tasks/keystone_install.yml
@@ -18,7 +18,7 @@
- name: install keystone packages
action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
- with_items: packages | union(packages_noarch)
+ with_items: "{{ packages | union(packages_noarch) }}"
- name: enable auto start
file:
@@ -38,7 +38,7 @@
- name: generate keystone service list
lineinfile: dest=/opt/service create=yes line='{{ item }}'
- with_items: services | union(services_noarch)
+ with_items: "{{ services | union(services_noarch) }}"
- name: delete sqlite database
file:
diff --git a/deploy/adapters/ansible/roles/keystone/vars/main.yml b/deploy/adapters/ansible/roles/keystone/vars/main.yml
index ecaf7b51..916d6608 100644
--- a/deploy/adapters/ansible/roles/keystone/vars/main.yml
+++ b/deploy/adapters/ansible/roles/keystone/vars/main.yml
@@ -93,13 +93,13 @@ os_services:
internalurl: "http://{{ internal_vip.ip }}:8000/v1"
adminurl: "http://{{ internal_vip.ip }}:8000/v1"
- - name: congress
- type: policy
- region: RegionOne
- description: "OpenStack Policy Service"
- publicurl: "http://{{ public_vip.ip }}:1789"
- internalurl: "http://{{ internal_vip.ip }}:1789"
- adminurl: "http://{{ internal_vip.ip }}:1789"
+# - name: congress
+# type: policy
+# region: RegionOne
+# description: "OpenStack Policy Service"
+# publicurl: "http://{{ public_vip.ip }}:1789"
+# internalurl: "http://{{ internal_vip.ip }}:1789"
+# adminurl: "http://{{ internal_vip.ip }}:1789"
# - name: swift
# type: object-store
@@ -173,12 +173,12 @@ os_users:
tenant: service
tenant_description: "Service Tenant"
- - user: congress
- password: "{{ CONGRESS_PASS }}"
- email: congress@admin.com
- role: admin
- tenant: service
- tenant_description: "Service Tenant"
+# - user: congress
+# password: "{{ CONGRESS_PASS }}"
+# email: congress@admin.com
+# role: admin
+# tenant: service
+# tenant_description: "Service Tenant"
- user: demo
password: "{{ DEMO_PASS }}"
@@ -193,3 +193,4 @@ os_users:
# role: admin
# tenant: service
# tenant_description: "Service Tenant"
+