4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 - name: adding acl read to write cert_path
18 name: "{{ caas.cert_path }}"
19 entity: "{{ users.admin_user_name }}"
23 when: not nodename | search("caas_master1")
26 # Kube secrets distribution
27 - name: Get kube secrets.conf
28 shell: 'rsync -a -e "ssh -o StrictHostKeyChecking=no" {{ users.admin_user_name }}@{{ groups.caas_master[0] }}:{{ caas.cert_path }}/{{ caas._secrets_conf }} {{ caas.cert_path }}/'
29 become_user: "{{ users.admin_user_name }}"
30 when: not nodename | search("caas_master1")
33 path: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
38 - name: allowing users to access keys
41 entity: "{{ item[1] }}"
46 - [ "{{ caas.cert_path }}/{{ caas._secrets_conf }}" ]
47 - "{{ caas.kubernetes_secret_users | default([]) }}"
50 - name: removing write permission from cert_path
52 name: "{{ caas.cert_path }}"
53 entity: "{{ users.admin_user_name }}"
57 when: not nodename | search("caas_master1")