Skip to content

Commit

Permalink
Avoid test require a dictionary error with jinja rule
Browse files Browse the repository at this point in the history
Fixes: #3155
  • Loading branch information
ssbarnea committed Mar 9, 2023
1 parent eda1aba commit 1a87aee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/playbooks/rule-jinja-pass.yml
Expand Up @@ -77,3 +77,7 @@
- name: Bug https://github.com/ansible/ansible-lint/issues/3136
ansible.builtin.debug:
msg: "IP is {{ foo | ansible.utils.ipaddr('address') }}"

- name: "Bug https://github.com/ansible/ansible-lint/issues/3155"
ansible.builtin.debug:
msg: "Is changed:{{ date_cmd is changed }}"
2 changes: 2 additions & 0 deletions src/ansiblelint/rules/jinja.py
Expand Up @@ -43,6 +43,8 @@
r"^Mandatory variable (.*) not defined.$",
r"is undefined",
r"Unrecognized type <<class 'ansible.template.AnsibleUndefined'>> for (.*) filter <value>$",
# https://github.com/ansible/ansible-lint/issues/3155
r"^The '(.*)' test expects a dictionary$",
]
),
flags=re.MULTILINE | re.DOTALL,
Expand Down

0 comments on commit 1a87aee

Please sign in to comment.