Skip to content

Commit

Permalink
Fix list of non-strings in args rule
Browse files Browse the repository at this point in the history
  • Loading branch information
John Byrne committed Jul 31, 2024
1 parent 1dbb602 commit f5f6325
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions examples/playbooks/rule-args-module-pass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,14 @@
src: "args.json"
action: ansible.builtin.copy
args: "{{ copy_vars }}" # since, we're unable to analyze jinja, we skip this kind of checks

- name: Variable containing list of non-strings should pass (Bug 4229)
community.general.mas:
id: "{{ item }}"
state: present
loop: "{{ mas_app_ids }}"
vars:
mas_app_ids:
- 409183694
- 409203825
- 409201541
2 changes: 1 addition & 1 deletion src/ansiblelint/rules/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def _parse_failed_msg(
error_message = failed_msg

option_type_check_error = re.search(
r"argument '(?P<name>.*)' is of type",
r"(argument|option) '(?P<name>.*)' is of type",
error_message,
)
if option_type_check_error:
Expand Down

0 comments on commit f5f6325

Please sign in to comment.