Skip to content

Commit

Permalink
Merge pull request #24 from remerge/escape-config-values
Browse files Browse the repository at this point in the history
Escape string values in config file
  • Loading branch information
hollow committed Oct 29, 2023
2 parents 636db83 + 5add51e commit 37c73ff
Show file tree
Hide file tree
Showing 9 changed files with 185 additions and 322 deletions.
1 change: 1 addition & 0 deletions .ansible-lint
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ exclude_paths:
skip_list:
- meta-no-info
- template-instead-of-copy
- var-naming[no-role-prefix]
- yaml[comments-indentation]
2 changes: 1 addition & 1 deletion .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Changes here will be overwritten by Copier
_commit: v2.1.3
_commit: v2.1.4-18-g036146e
_src_path: gh:remerge/template
project_id: ansible-role-nomad
project_license: apache-2.0
Expand Down
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
ignore = E501
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ default_install_hook_types:
repos:
# https://github.com/pre-commit/pre-commit-hooks/tags
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.4.0"
rev: "v4.5.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -74,7 +74,7 @@ repos:

# https://github.com/ansible/ansible-lint/tags
- repo: https://github.com/ansible/ansible-lint
rev: "v6.20.0"
rev: "v6.21.1"
hooks:
- id: ansible-lint
name: ansible-lint
Expand All @@ -96,7 +96,7 @@ repos:

# https://github.com/bridgecrewio/checkov/tags
- repo: https://github.com/bridgecrewio/checkov
rev: "2.4.48"
rev: "3.0.12"
hooks:
- id: checkov
name: checkov
Expand Down
5 changes: 1 addition & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"python.formatting.provider": "black",
"python.linting.pylintEnabled": true,
"python.linting.flake8Enabled": true,
"[python]": {
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "ms-python.python"
"editor.defaultFormatter": "ms-python.black-formatter"
},
"python.defaultInterpreterPath": ".venv/bin/python",
"ansible.python.interpreterPath": ".venv/bin/python",
Expand Down
Empty file added bin/.keep
Empty file.
481 changes: 172 additions & 309 deletions poetry.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ authors = ["Remerge GmbH <core@remerge.io>"]
python = "^3.9"

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

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
4 changes: 2 additions & 2 deletions templates/client.hcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ client {
{% if nomad_client_metadata is defined %}
meta {
{% for key , value in nomad_client_metadata.items() %}
{{ key }} = "{{ value }}"
{{ key }} = {{ value | string | to_json }}
{% endfor %}
}
{% endif %}
Expand All @@ -42,7 +42,7 @@ plugin "docker" {
type = "{{ nomad_docker_logging['type'] }}"
config {
{% for key , value in nomad_docker_logging['config'].items() %}
{{ key }} = "{{ value }}"
{{ key }} = {{ value | string | to_json }}
{% endfor %}
}
}
Expand Down

0 comments on commit 37c73ff

Please sign in to comment.