Skip to content

Commit 37c73ff

Browse files
authored
Merge pull request #24 from remerge/escape-config-values
Escape string values in config file
2 parents 636db83 + 5add51e commit 37c73ff

9 files changed

+185
-322
lines changed

.ansible-lint

+1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ exclude_paths:
1818
skip_list:
1919
- meta-no-info
2020
- template-instead-of-copy
21+
- var-naming[no-role-prefix]
2122
- yaml[comments-indentation]

.copier-answers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
# Changes here will be overwritten by Copier
3-
_commit: v2.1.3
3+
_commit: v2.1.4-18-g036146e
44
_src_path: gh:remerge/template
55
project_id: ansible-role-nomad
66
project_license: apache-2.0

.flake8

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[flake8]
2+
ignore = E501

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ default_install_hook_types:
1010
repos:
1111
# https://github.com/pre-commit/pre-commit-hooks/tags
1212
- repo: https://github.com/pre-commit/pre-commit-hooks
13-
rev: "v4.4.0"
13+
rev: "v4.5.0"
1414
hooks:
1515
- id: check-added-large-files
1616
- id: check-case-conflict
@@ -74,7 +74,7 @@ repos:
7474

7575
# https://github.com/ansible/ansible-lint/tags
7676
- repo: https://github.com/ansible/ansible-lint
77-
rev: "v6.20.0"
77+
rev: "v6.21.1"
7878
hooks:
7979
- id: ansible-lint
8080
name: ansible-lint
@@ -96,7 +96,7 @@ repos:
9696

9797
# https://github.com/bridgecrewio/checkov/tags
9898
- repo: https://github.com/bridgecrewio/checkov
99-
rev: "2.4.48"
99+
rev: "3.0.12"
100100
hooks:
101101
- id: checkov
102102
name: checkov

.vscode/settings.json

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"python.formatting.provider": "black",
3-
"python.linting.pylintEnabled": true,
4-
"python.linting.flake8Enabled": true,
52
"[python]": {
63
"editor.formatOnSave": true,
74
"editor.formatOnSaveMode": "file",
8-
"editor.defaultFormatter": "ms-python.python"
5+
"editor.defaultFormatter": "ms-python.black-formatter"
96
},
107
"python.defaultInterpreterPath": ".venv/bin/python",
118
"ansible.python.interpreterPath": ".venv/bin/python",

bin/.keep

Whitespace-only changes.

poetry.lock

+172-309
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ authors = ["Remerge GmbH <[email protected]>"]
88
python = "^3.9"
99

1010
[tool.poetry.group.dev.dependencies]
11-
black = "^23.9.1"
11+
black = "^23.10.1"
1212
flake8 = "^6.1.0"
1313
flake8-bugbear = "^23.9.16"
14-
pylint = "^2.17.5"
14+
pylint = "^3.0.2"
1515
tox = "^4.11.3"
1616
molecule = { extras = ["docker"], version = "^6.0.2" }
17-
ansible-lint = { version = "^6.20.0", markers = "platform_system != 'Windows'" }
17+
ansible-lint = { version = "^6.21.1", markers = "platform_system != 'Windows'" }
1818

1919
[build-system]
2020
requires = ["poetry-core>=1.0.0"]

templates/client.hcl.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ client {
2828
{% if nomad_client_metadata is defined %}
2929
meta {
3030
{% for key , value in nomad_client_metadata.items() %}
31-
{{ key }} = "{{ value }}"
31+
{{ key }} = {{ value | string | to_json }}
3232
{% endfor %}
3333
}
3434
{% endif %}
@@ -42,7 +42,7 @@ plugin "docker" {
4242
type = "{{ nomad_docker_logging['type'] }}"
4343
config {
4444
{% for key , value in nomad_docker_logging['config'].items() %}
45-
{{ key }} = "{{ value }}"
45+
{{ key }} = {{ value | string | to_json }}
4646
{% endfor %}
4747
}
4848
}

0 commit comments

Comments
 (0)