8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash when using task alias
ansible-lint --version ansible-lint 25.1.3 using ansible-core:2.16.14 ansible-compat:25.1.4 ruamel-yaml:0.18.10 ruamel-yaml-clib:0.2.12
- name: Test hosts: localhost vars: database_port: 5432 tasks: - name: Create database user community.postgresql.postgresql_user: name: "{{ user_name }}" password: "{{ user_password }}" login_db: "{{ database_name }}" login_host: "{{ database_host }}" login_port: "{{ database_port }}" login_user: "{{ database_login_user }}" login_password: "{{ database_login_password }}" configuration: "{{ {'role': database_name + '_' + user_type} if ((user_type | default(omit)) != omit) else omit }}" delegate_to: localhost become: false
DEBUG Running rule args WARNING Ignored exception from ArgsRule.matchtasks while processing ~/projects/_test.yml (playbook): 'port' DEBUG Ignored exception details Traceback (most recent call last): File "/home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/lib/python3.12/site-packages/ansiblelint/_internal/rules.py", line 105, in getmatches matches.extend(method(file)) ^^^^^^^^^^^^ File "/home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/lib/python3.12/site-packages/ansiblelint/rules/__init__.py", line 178, in matchtasks result = self.matchtask(task, file=file) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/lib/python3.12/site-packages/ansiblelint/rules/args.py", line 197, in matchtask self._parse_failed_msg(failed_msg, task, module_name, file), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/demarteaub/.local/share/virtualenvs/ansible-JeMCc-2q/lib/python3.12/site-packages/ansiblelint/rules/args.py", line 243, in _parse_failed_msg option_value = task["action"][option_key] ~~~~~~~~~~~~~~^^^^^^^^^^^^ KeyError: 'port'[/]
No exception, using an alias is valid. It works fine when using port: instead of login_port:.
port:
login_port:
Please give some details of what is happening. Include a minimum complete verifiable example with:
ansible-playbook --syntax-check playbook
ansible-playbook --syntax-check ../../_test.yml playbook: ../../_test.yml
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Summary
Crash when using task alias
Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Desired Behavior
No exception, using an alias is valid. It works fine when using
port:
instead oflogin_port:
.Actual Behavior
Please give some details of what is happening. Include a minimum complete
verifiable example with:
ansible-playbook --syntax-check playbook
The text was updated successfully, but these errors were encountered: