summaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible/roles/keystone/tasks
diff options
context:
space:
mode:
authorliyuenan <liyuenan@huawei.com>2016-12-22 16:59:08 +0800
committerliyuenan <liyuenan@huawei.com>2016-12-26 17:54:43 +0800
commit6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (patch)
treea78a15b915741bb3ef7ddd4a61a801dd9f46d577 /deploy/adapters/ansible/roles/keystone/tasks
parenta9041dbf7b68f56169e82de3c37601b7e86867b0 (diff)
Update ansible version
JIRA: COMPASS-511 Change-Id: Id0e83c65a08c9f9036b5d3a597b905e8a7bde6e8 Signed-off-by: liyuenan <liyuenan@huawei.com>
Diffstat (limited to 'deploy/adapters/ansible/roles/keystone/tasks')
-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
3 files changed, 37 insertions, 4 deletions
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: