Skip to content

Commit f94ecc2

Browse files
committed
Disable local Mermaid output on control node in Molecule
You're not allowed to place files into the control node during a Molecule scenario
1 parent 89f4973 commit f94ecc2

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

docs/logstash-pipelines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ It can be quite difficult to stay on top of your pipeline configuration because
66

77
This collection will leave some comments about how pipelines are interconnected within the `/etc/logstash/pipelines.yml` configuration file.
88

9-
If you set `logstash_mermaid` to `true` (which is the default), then you will also get a new file in `/etc/logstash/pipelines.mermaid`. You can paste it into a Mermaid editor in your documentation tool or in an [online Mermaid editor](https://mermaid.live/).
9+
If you set `logstash_mermaid` to `true` (which is the default), then you will also get a new file in `/etc/logstash/pipelines.mermaid`. You can paste it into a Mermaid editor in your documentation tool or in an [online Mermaid editor](https://mermaid.live/). The same content will be available on your control node in a temporary file. You can even add arbitrary code to reflect manually managed pipelines by using `logstash_mermaid_extra`.
1010

1111
## Git managed ##
1212

docs/role-logstash.md

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Aside from `logstash.yml` we can manage Logstashs pipelines.
9292
* *logstash_mermaid*: Print overview over Logstash pipelines in Mermaid syntax. (default: `true`)
9393
* *logstash_mermaid_logstash*: Place Mermaid syntax into `/etc/logstash/pipelines.mermaid` on Logstash hosts. (default: `true`)
9494
* *logstash_mermaid_local*: Place Mermaid syntax into temporary file on control node. (default: `true`)
95+
* *logstash_mermaid_extra*: You can add extra Mermaid syntax to the output by adding it to this variable. YAML-multiline is supported. (default: none)
9596

9697
The following variables configure Log4j for Logstash. All default to `true` as this is the default after the installation.
9798

molecule/elasticstack_default/converge.yml

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
elasticstack_no_log: false
2020
logstash_pipeline_unsafe_shutdown: true
2121
logstash_redis_password: "{{ lookup('ansible.builtin.password', '/tmp/redispassword', chars=['ascii_letters'], length=15) }}"
22+
logstash_mermaid_local: false # no permission to write into Docker control node
2223
redis_requirepass: "{{ logstash_redis_password }}"
2324
beats_filebeat_journald: true
2425
beats_filebeat_modules:

roles/logstash/templates/pipelines.mermaid.j2

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ p_{{ item.name }}{{ '[' }}{{ item.name }}{{ ']' }} --> {% if output.condition is
2626
{% endif %}
2727
{% endfor %}
2828
{% endif %}
29+
{% if logstash_mermaid_extra is defined %}
30+
{{ logstash_mermaid_extra }}
31+
{% endif %}

0 commit comments

Comments
 (0)