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: check instance secret
18 path: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
19 register: secrets_conf
22 command: "bash -c \"head -c 32 /dev/urandom | base64 -i - \""
23 register: kube_secret_enc_key
25 when: not secrets_conf.stat.exists
27 - name: template secrets.conf
30 dest: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
32 when: not secrets_conf.stat.exists
34 - name: adding default acl read to {{ users.admin_user_name }} to {{ caas.cert_path }}/{{ caas._secrets_conf }}
36 name: "{{ caas.cert_path }}/{{ caas._secrets_conf }}"
37 entity: "{{ users.admin_user_name }}"
41 when: not secrets_conf.stat.exists