diff options
author | liyuenan <liyuenan@huawei.com> | 2016-12-22 16:59:08 +0800 |
---|---|---|
committer | liyuenan <liyuenan@huawei.com> | 2016-12-26 17:54:43 +0800 |
commit | 6072a49adb33f2bce3f48b9c7b8be7d96cf8501c (patch) | |
tree | a78a15b915741bb3ef7ddd4a61a801dd9f46d577 /deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml | |
parent | a9041dbf7b68f56169e82de3c37601b7e86867b0 (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/keystone_create.yml')
-rw-r--r-- | deploy/adapters/ansible/roles/keystone/tasks/keystone_create.yml | 33 |
1 files changed, 33 insertions, 0 deletions
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 + |