Skip to content

Commit 1ee5daf

Browse files
committed
Explicitly cast elastic_release for molecule
When fetching data from ENV for molecule, we need to explicitly cast it to int before comparing
1 parent e658cfd commit 1ee5daf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

roles/logstash/tasks/logstash-security.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@
234234
run_once: true
235235
when:
236236
- logstash_writer_role_present.rc > 0 or logstash_reset_writer_role | bool
237-
- elastic_release < 8
237+
- elastic_release | int < 8
238238

239239
- name: Put logstash_writer role into Elasticsearch > 7
240240
command: >
@@ -246,7 +246,7 @@
246246
run_once: true
247247
when:
248248
- logstash_writer_role_present.rc > 0 or logstash_reset_writer_role | bool
249-
- elastic_release > 7
249+
- elastic_release | int > 7
250250

251251
- name: Check for logstash_writer user
252252
shell: >
@@ -274,7 +274,7 @@
274274
run_once: true
275275
when:
276276
- logstash_writer_user_present.rc > 0
277-
- elastic_release < 8
277+
- elastic_release | int < 8
278278

279279
- name: Put logstash_writer user into Elasticsearch > 7
280280
command: >
@@ -286,4 +286,4 @@
286286
run_once: true
287287
when:
288288
- logstash_writer_user_present.rc > 0
289-
- elastic_release > 7
289+
- elastic_release | int > 7

0 commit comments

Comments
 (0)