From 95276fbd94f342ad2385a2fedda86d097a25676e Mon Sep 17 00:00:00 2001 From: Jimmy McCrory Date: Fri, 27 May 2016 09:05:09 -0700 Subject: [PATCH] Remove unnecessary overrides of service variables The cinder service user, project, region, and password are the same regardless of the API endpoint version. Use the existing cinder namespaced variables instead of overriding and providing a generic 'service_' variable for use with the service setup tasks. This also fixes a recursive loop issue seen when deploying the integrated release with Ansible 2.1: http://tinyurl.com/hhuljtu Change-Id: I469dcabb03c792abbad7f65a17bfa5f7146dcfa7 --- tasks/cinder_service_add.yml | 12 ++++++------ tasks/cinder_service_setup.yml | 8 -------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/tasks/cinder_service_add.yml b/tasks/cinder_service_add.yml index fbdd97cc..8305a977 100644 --- a/tasks/cinder_service_add.yml +++ b/tasks/cinder_service_add.yml @@ -42,9 +42,9 @@ login_user: "{{ keystone_admin_user_name }}" login_password: "{{ keystone_auth_admin_password }}" login_project_name: "{{ keystone_admin_tenant_name }}" - user_name: "{{ service_user_name }}" - tenant_name: "{{ service_tenant_name }}" - password: "{{ service_password }}" + user_name: "{{ cinder_service_user_name }}" + tenant_name: "{{ cinder_service_project_name }}" + password: "{{ cinder_service_password }}" insecure: "{{ keystone_service_adminuri_insecure }}" register: add_service when: not cinder_service_in_ldap | bool @@ -64,8 +64,8 @@ login_user: "{{ keystone_admin_user_name }}" login_password: "{{ keystone_auth_admin_password }}" login_project_name: "{{ keystone_admin_tenant_name }}" - user_name: "{{ service_user_name }}" - tenant_name: "{{ service_tenant_name }}" + user_name: "{{ cinder_service_user_name }}" + tenant_name: "{{ cinder_service_project_name }}" role_name: "{{ cinder_service_role_name }}" insecure: "{{ keystone_service_adminuri_insecure }}" register: add_service @@ -86,7 +86,7 @@ login_user: "{{ keystone_admin_user_name }}" login_password: "{{ keystone_auth_admin_password }}" login_project_name: "{{ keystone_admin_tenant_name }}" - region_name: "{{ service_region }}" + region_name: "{{ cinder_service_region }}" service_name: "{{ service_name }}" service_type: "{{ service_type }}" insecure: "{{ keystone_service_adminuri_insecure }}" diff --git a/tasks/cinder_service_setup.yml b/tasks/cinder_service_setup.yml index 3ce79402..d55599dd 100644 --- a/tasks/cinder_service_setup.yml +++ b/tasks/cinder_service_setup.yml @@ -15,13 +15,9 @@ - include: cinder_service_add.yml vars: - service_user_name: "{{ cinder_service_user_name }}" - service_tenant_name: "{{ cinder_service_project_name }}" service_name: "{{ cinder_service_name }}" service_type: "{{ cinder_service_type }}" - service_region: "{{ cinder_service_region }}" service_description: "{{ cinder_service_description }}" - service_password: "{{ cinder_service_password }}" service_publicurl: "{{ cinder_service_publicurl }}" service_internalurl: "{{ cinder_service_internalurl }}" service_adminurl: "{{ cinder_service_adminurl }}" @@ -30,13 +26,9 @@ - include: cinder_service_add.yml vars: - service_user_name: "{{ cinder_service_user_name }}" - service_tenant_name: "{{ cinder_service_project_name }}" service_name: "{{ cinder_service_v2_name }}" service_type: "{{ cinder_service_v2_type }}" - service_region: "{{ cinder_service_region }}" service_description: "{{ cinder_service_v2_description }}" - service_password: "{{ cinder_service_password }}" service_publicurl: "{{ cinder_service_v2_publicurl }}" service_internalurl: "{{ cinder_service_v2_internalurl }}" service_adminurl: "{{ cinder_service_v2_adminurl }}"