Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix escaping of backslash character. #8

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
owner: root
group: root
mode: u=rwx,g=rx,o=rx
when: node_exporter_scripts != []
when: node_exporter_scripts | length >= 1

- name: Add git repos for node_exporter scripts
ansible.builtin.git:
Expand Down
2 changes: 1 addition & 1 deletion templates/flags
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#jinja2: trim_blocks: "false", lstrip_blocks: "true"
{% for collector in node_exporter_enabled_collectors %}
{% if not collector is mapping %}

Check failure on line 3 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 5, got 1 (S3)
--collector.{{ collector }} \
{% else %}

Check failure on line 5 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 5, got 1 (S3)
{% set name, options = (collector.items()|list)[0] %}

Check failure on line 6 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

The operator | needs to be enclosed by a single space on each side (S2)

Check failure on line 6 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 9, got 1 (S3)
--collector.{{ name }} \
{% for k,v in options|dictsort %}

Check failure on line 8 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

The operator | needs to be enclosed by a single space on each side (S2)

Check failure on line 8 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 9, got 1 (S3)
--collector.{{ name }}.{{ k }}={{ v | quote }} \
{% endfor %}

Check failure on line 10 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 9, got 1 (S3)
{% endif %}

Check failure on line 11 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 5, got 1 (S3)
{% endfor %}
{% for collector in node_exporter_disabled_collectors %}
--no-collector.{{ collector }} \
Expand All @@ -17,13 +17,13 @@
--collector.textfile.directory="{{ node_exporter_textfile_directory }}" \
{% endif %}
{% for k,v in node_exporter_extra_flags | dictsort %}
{% if v == "" %}

Check failure on line 20 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 5, got 1 (S3)
--{{ k }} \
{% else %}

Check failure on line 22 in templates/flags

View workflow job for this annotation

GitHub Actions / Jinja2 Lint

Bad Indentation, expected 5, got 1 (S3)
--{{ k }}={{ v | quote }} \
{% endif %}
{% endfor %}
--log.level="{{ node_exporter_log_level }}" \
{% for node_exporter_listen_address in node_exporter_listen_addresses %}
--web.listen-address="{{ node_exporter_listen_address }}" {{ '\\\\' if not loop.last }}
--web.listen-address="{{ node_exporter_listen_address }}" {{ "\\" if not loop.last }}
{% endfor %}