From 8b3b4884ab72e5b86b8850872bf50c6a067c001b Mon Sep 17 00:00:00 2001 From: bborbely Date: Fri, 19 Jul 2019 13:44:54 +0200 Subject: [PATCH] Move swift authentication data to cm Signed-off-by: bborbely Change-Id: Iff79fe1ca00a5a1699c1b8e56295b12bd69bebc6 --- deploy/group_vars/controller-1.caas_master/params.yml | 1 - deploy/roles/clean_chart/tasks/main.yml | 11 +---------- su/roles/su_prepare/tasks/merge-charts.yml | 14 ++------------ 3 files changed, 3 insertions(+), 23 deletions(-) diff --git a/deploy/group_vars/controller-1.caas_master/params.yml b/deploy/group_vars/controller-1.caas_master/params.yml index b9e7ced..d4d64ad 100644 --- a/deploy/group_vars/controller-1.caas_master/params.yml +++ b/deploy/group_vars/controller-1.caas_master/params.yml @@ -19,6 +19,5 @@ use_local_versions: false cbam: false helm_install_set: "" -swift_admin_path: "/etc/swift/usr/admin" image_versions_path: "{{ caas_manifest_path }}" manifest_path: "{{ use_local_manifest|bool | ternary('manifests', '/tmp') }}" diff --git a/deploy/roles/clean_chart/tasks/main.yml b/deploy/roles/clean_chart/tasks/main.yml index 1b1afb7..30ff184 100644 --- a/deploy/roles/clean_chart/tasks/main.yml +++ b/deploy/roles/clean_chart/tasks/main.yml @@ -13,21 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: fetch files from server which contains the necessary variables - fetch: src={{ item }} dest=/tmp/ flat=yes - with_items: - - /etc/swift/usr/admin/admin.yml - -- name: register infos for swift_auth - set_fact: - swift_credential: "{{ lookup('file', swift_admin_path + '/admin.yml') | from_yaml }}" - - name: authenticate on swift uri: url: "{{ caas.swift }}/auth/v1.0" headers: X_Auth_User: admin:admin - X_Auth_Key: "{{ swift_credential.swift_password }}" + X_Auth_Key: "{{ caas.swift_credential.password }}" register: auth - name: clean charts list file if exists diff --git a/su/roles/su_prepare/tasks/merge-charts.yml b/su/roles/su_prepare/tasks/merge-charts.yml index cff001a..f68aaa1 100644 --- a/su/roles/su_prepare/tasks/merge-charts.yml +++ b/su/roles/su_prepare/tasks/merge-charts.yml @@ -13,16 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -- name: fetch files from server which contains the necessary variables - fetch: - src: /etc/swift/usr/admin/admin.yml - dest: /tmp/ - flat: yes - -- name: register infos for swift_auth - set_fact: - swift_credential: "{{ lookup('file', '/tmp/admin.yml') | from_yaml }}" - - name: pause to wait for swift-update to be ready pause: minutes: 1 @@ -32,7 +22,7 @@ url: "{{ caas.swift_update }}/auth/v1.0" headers: X_Auth_User: admin:admin - X_Auth_Key: "{{ swift_credential.swift_password }}" + X_Auth_Key: "{{ caas.swift_credential.password }}" register: auth - name: get packages @@ -84,7 +74,7 @@ url: "{{ caas.swift }}/auth/v1.0" headers: X_Auth_User: admin:admin - X_Auth_Key: "{{ swift_credential.swift_password }}" + X_Auth_Key: "{{ caas.swift_credential.password }}" register: auth_orig ignore_errors: yes -- 2.16.6