Skip to content

Commit c2ee24a

Browse files
authored
Remove variables to check defaults (NETWAYS#148)
* Remove variables to check defaults * Failsafe for conditional fixes NETWAYS#4
1 parent 1376f62 commit c2ee24a

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

molecule/full_stack-oss/converge.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@
1212
- name: Converge
1313
hosts: all
1414
vars:
15-
logstash_enable: true
16-
logstash_security: true
17-
elasticsearch_security: false
1815
elastic_stack_full_stack: true
1916
elastic_variant: oss
17+
logstash_security: false
2018
elastic_security: false
2119
filebeat_syslog_udp: true
2220
filebeat_syslog_tcp: true

molecule/full_stack/converge.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
- name: Converge
77
hosts: all
88
vars:
9-
logstash_enable: true
10-
logstash_security: true
119
elastic_stack_full_stack: true
1210
filebeat_syslog_udp: true
1311
filebeat_syslog_tcp: true

tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
import_tasks: logstash-security.yml
5656
when:
5757
- elastic_stack_full_stack | bool
58-
- logstash_security | bool
58+
- logstash_security is defined and logstash_security | bool
5959
- elastic_variant == "elastic"
6060
tags:
6161
- security

templates/elasticsearch-output.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ filter {
2121
output {
2222
elasticsearch {
2323
hosts => [ {% for host in logstash_elasticsearch %}"{{ host }}:9200"{% if not loop.last %},{% endif %}{% endfor %}]
24-
{% if elastic_stack_full_stack | bool and logstash_security | bool and elastic_variant == "elastic" %}
24+
{% if elastic_stack_full_stack | bool and logstash_security is defined and logstash_security | bool and elastic_variant == "elastic" %}
2525
keystore => "{{ logstash_certs_dir }}/keystore.pfx"
2626
keystore_password => "{{ logstash_tls_key_passphrase }}"
2727
cacert => "{{ logstash_certs_dir }}/ca.crt"

0 commit comments

Comments
 (0)