Skip to content

Commit a0cb693

Browse files
author
David Okon
committed
added ansible.builtin.stat and fixed fqcn errors
1 parent 098a6a2 commit a0cb693

1 file changed

Lines changed: 10 additions & 4 deletions

File tree

roles/kibana/tasks/kibana-security.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,12 @@
140140
changed_when: false
141141
args:
142142
creates: "{{ elasticstack_ca_dir }}/encryption_key"
143-
- debug:
143+
- ansible.builtin.stat:
144+
path: "{{ elasticstack_ca_dir }}/encryption_key"
145+
register: encryption_key_exists
146+
- ansible.builtin.debug:
144147
msg: "File exists..."
145-
when: encryption_key_exists.stat.exits
148+
when: encryption_key_exists.stat.exits
146149

147150
- name: Fetch encryption key
148151
ansible.builtin.command: cat {{ elasticstack_ca_dir }}/encryption_key
@@ -157,9 +160,12 @@
157160
changed_when: false
158161
args:
159162
creates: "{{ elasticstack_ca_dir }}/savedobjects_encryption_key"
160-
- debug:
163+
- ansible.builtin.stat:
164+
path: "{{ elasticstack_ca_dir }}/savedobjects_encryption_key"
165+
register: savedobjects_encryption_key
166+
- ansible.builtin.debug:
161167
msg: "File exists..."
162-
when: savedobjects_encryption_key_exists.stat.exits
168+
when: savedobjects_encryption_key.stat.exits
163169

164170
- name: Fetch saved objects encryption key
165171
ansible.builtin.command: cat {{ elasticstack_ca_dir }}/savedobjects_encryption_key

0 commit comments

Comments
 (0)