File tree Expand file tree Collapse file tree 1 file changed +1
-25
lines changed Expand file tree Collapse file tree 1 file changed +1
-25
lines changed Original file line number Diff line number Diff line change 19
19
path : " {{ wazuh_secrets_path }}"
20
20
register : waz_exist_result
21
21
22
- - name : Decrypt wazuh-secrets to checksum
23
- no_log : True
24
- copy :
25
- content : " {{ lookup('ansible.builtin.file', wazuh_secrets_path) | ansible.builtin.vault(ansible_vault_password) }}"
26
- dest : " {{ wazuh_secrets_path }}"
27
- decrypt : true
28
- vars :
29
- ansible_vault_password : " {{ lookup('ansible.builtin.env', 'KAYOBE_VAULT_PASSWORD') }}"
30
- when : waz_exist_result.stat.exists
31
-
32
- - name : Template new secrets
33
- no_log : True
34
- template :
35
- src : wazuh-secrets.yml.j2
36
- dest : " /tmp/wazuh-secrets.yml"
37
- when : waz_exist_result.stat.exists
38
-
39
- - name : Copy for checksum
40
- no_log : True
41
- copy :
42
- content : " {{ lookup('ansible.builtin.file', '/tmp/wazuh-secrets.yml') }}"
43
- dest : " {{ wazuh_secrets_path }}"
44
- checksum : yes
45
- when : waz_exist_result.stat.exists
46
-
47
22
- name : Template new secrets
48
23
no_log : True
49
24
template :
59
34
decrypt : false
60
35
vars :
61
36
ansible_vault_password : " {{ lookup('ansible.builtin.env', 'KAYOBE_VAULT_PASSWORD') }}"
37
+ when : not waz_exist_result.stat.exists
You can’t perform that action at this time.
0 commit comments