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 # Service account distribution
27 - name: Get service-account key from caas_master1
28 shell: 'rsync -a -e "ssh -o StrictHostKeyChecking=no" {{ users.admin_user_name }}@{{ groups.caas_master[0] }}:{{ caas.cert_path }}/{{ item }} {{ caas.cert_path }}/'
29 become_user: "{{ users.admin_user_name }}"
33 when: not nodename | search("caas_master1")
35 - name: allowing users to access keys
38 entity: "{{ item[1] }}"
43 - [ "{{ caas.cert_path }}/{{ _key }}", "{{ caas.cert_path }}/{{ _cert }}" ]
44 - "{{ add_users | default([]) }}"
45 when: not nodename | search("caas_master1")
47 - name: removing write permission from cert_path
49 name: "{{ caas.cert_path }}"
50 entity: "{{ users.admin_user_name }}"
54 when: not nodename | search("caas_master1")