Skip to content

Commit

Permalink
Merge branch 'main' into add-inventory-option
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Nov 21, 2024
2 parents f9e104a + 5ab7c7e commit f92d14d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .config/constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ chardet==5.2.0 # via tox
charset-normalizer==3.4.0 # via requests
click==8.1.7 # via black, mkdocs, mkdocstrings
colorama==0.4.6 # via griffe, mkdocs-material, tox
coverage==7.6.4 # via coverage-enable-subprocess, ansible-lint (pyproject.toml)
coverage==7.6.7 # via coverage-enable-subprocess, ansible-lint (pyproject.toml)
coverage-enable-subprocess==1.0 # via ansible-lint (pyproject.toml)
cryptography==43.0.3 # via ansible-core
csscompressor==0.9.5 # via mkdocs-minify-plugin
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ jobs:
fi
- name: Upload coverage data
uses: codecov/codecov-action@v4.5.0
uses: codecov/codecov-action@v5.0.7
with:
name: ${{ matrix.name }}
# verbose: true # optional (default = false)
Expand Down
15 changes: 15 additions & 0 deletions examples/playbooks/rule-jinja-pass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,18 @@
- name: Bug https://github.com/ansible/ansible-lint/issues/3908
ansible.builtin.debug:
msg: "{{ foo | ansible.builtin.mandatory(msg='My message') }}"

- name: Bugs https://github.com/ansible/ansible-lint/issues/4338
hosts: localhost
tasks:
- name: Test task
ansible.builtin.debug:
msg: "Hello, world!"
when: false
register: result

- name: Test task 2
vars:
counter: "{{ result is skipped | ternary(1, 2) }}"
ansible.builtin.debug:
msg: "Hello, world {{ counter }}!"
2 changes: 2 additions & 0 deletions src/ansiblelint/rules/jinja.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ class Token(NamedTuple):
r"Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for (.*) filter <value>$",
# https://github.com/ansible/ansible-lint/issues/3155
r"^The '(.*)' test expects a dictionary$",
# https://github.com/ansible/ansible-lint/issues/4338
r"An unhandled exception occurred while templating (.*). Error was a <class 'ansible.errors.AnsibleFilterError'>, original message: The (.*) test expects a dictionary$",
],
),
flags=re.MULTILINE | re.DOTALL,
Expand Down

0 comments on commit f92d14d

Please sign in to comment.