Move swift authentication data to cm 08/1108/3
authorbborbely <botond.borbely@nokia.com>
Tue, 2 Jul 2019 14:16:20 +0000 (16:16 +0200)
committerbborbely <botond.borbely@nokia.com>
Wed, 3 Jul 2019 07:22:10 +0000 (09:22 +0200)
Change-Id: Ic8c758c8f2a85c3b6a20c65fd7de94f998c2f899
Signed-off-by: bborbely <botond.borbely@nokia.com>
SPECS/utils.spec
ansible/roles/pre_config_all/tasks/main.yml
utils/common/aliases.sh [deleted file]

index 1c3efac..b65f243 100644 (file)
@@ -49,11 +49,9 @@ install -m 0700 utils/deploy/merge_image.sh %{buildroot}/%{_caas_libexec_path}/
 mkdir -p %{buildroot}/etc/systemd/system/
 # --------------------------- COMMON
 mkdir -p %{buildroot}/etc/profile.d/
-install -m 0644 utils/common/aliases.sh %{buildroot}/etc/profile.d/
 
 %files
 %{_caas_libexec_path}/merge_image.sh
-/etc/profile.d/aliases.sh
 /etc/logrotate.d/kubelet-plugins
 %exclude %{_caas_libexec_path}/*pyc
 %exclude %{_caas_libexec_path}/*pyo
@@ -81,8 +79,6 @@ if [ $1 == 0 ]; then
 /usr/bin/systemctl daemon-reload
 # --------------------------- DEPLOY
 # --------------------------- COMMON
-  rm -rf /etc/profile.d/aliases.sh
-
 fi
 
 
index f074452..ce07505 100644 (file)
   shell: "kubectl completion bash > /etc/bash_completion.d/kubectl-bash"
   become: true
   become_user: "root"
-
-- name: set envinment variables
-  lineinfile:
-    dest: /etc/environment
-    state: present
-    line: "{{ item }}"
-    regexp: "{{ item }}"
-  become: true
-  become_user: "root"
-  with_items:
-    - "SWIFT_URL={{ caas.swift }}"
diff --git a/utils/common/aliases.sh b/utils/common/aliases.sh
deleted file mode 100644 (file)
index 18587bb..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/bin/sh
-# Copyright 2019 Nokia
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-# Swift
-function swiftauth { source /etc/swift/usr/admin/env_file; export SWIFT_AUTH_KEY=`curl --cacert /etc/swift/main/tls-proxy/ca.pem -XGET -i -H"X-Auth-User:${SWIFT_TENANT}:${SWIFT_USER}" -H"X-Auth-Key:${SWIFT_PASS}" "${SWIFT_URL}/auth/v1.0" | grep X-Auth-Token: | awk '{print $2;}'`; }
-function swiftget { curl --cacert /etc/swift/main/tls-proxy/ca.pem -XGET -H"X-Auth-Token: ${SWIFT_AUTH_KEY}" "${SWIFT_URL}/v1.0/AUTH_admin${1}"; }
-function swiftput { curl --cacert /etc/swift/main/tls-proxy/ca.pem -XPUT -H"X-Auth-Token: ${SWIFT_AUTH_KEY}" -T ${1} "${SWIFT_URL}/v1.0/AUTH_admin${2}"; }