Replies: 1 comment
-
That was not really a proper bug report and the line |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying to execute powershell script throw ansible task:
ansible.windows.win_get_url:
url: "{{
visual_cpp_redistributable_package_url
}}/{{
'vcredist_x86.exe'
if ( visual_cpp_redistributable_packages_arch | d(hostvars[inventory_hostname]['ansible_architecture2']) ) == 'x86'
else 'vcredist_x64.exe'
}}"
dest: "{{ visual_cpp_redistributable_package_download_dir.path }}\install.exe"
while executing this task with ansible lint i am getting below error:
WARNING Unable to load module ansible.windows.win_powershell at visual_cpp_redistributable_packages/molecule/default/verify.yml:7 for options validation
WARNING Unable to load module ansible.windows.win_tempfile at visual_cpp_redistributable_packages/tasks/main.yml:5 for options validation
WARNING Unable to load module ansible.windows.win_get_url at visual_cpp_redistributable_packages/tasks/main.yml:11 for options validation
WARNING Unable to load module ansible.windows.win_command at visual_cpp_redistributable_packages/tasks/main.yml:20 for options validation
WARNING Listing 1 violation(s) that are fatal
jinja[spacing]: Jinja2 spacing could be improved: {{ visual_cpp_redistributable_package_url }}/{{ 'vcredist_x86.exe' if ( visual_cpp_redistributable_packages_arch | d(hostvars[inventory_hostname]['ansible_architecture2']) ) == 'x86' else 'vcredist_x64.exe' }} -> {{ visual_cpp_redistributable_package_url }}/{{ 'vcredist_x86.exe' if (visual_cpp_redistributable_packages_arch | d(hostvars[inventory_hostname]['ansible_architecture2'])) == 'x86' else 'vcredist_x64.exe' }}
visual_cpp_redistributable_packages/tasks/main.yml:11 Jinja2 template rewrite recommendation:
{{ visual_cpp_redistributable_package_url }}/{{ 'vcredist_x86.exe' if (visual_cpp_redistributable_packages_arch | d(hostvars[inventory_hostname]['ansible_architecture2'])) == 'x86' else 'vcredist_x64.exe' }}
.You can skip specific rules or tags by adding them to your configuration file:
.config/ansible-lint.yml
warn_list: # or 'skip_list' to silence them completely
jinja[spacing] # Rule that looks inside jinja2 templates.
count tag profile rule associated tags
1 jinja[spacing] basic formatting
Failed after min profile: 1 failure(s), 0 warning(s) on 22 files.
A new release of ansible-lint is available: 6.11.0 → 6.13.1
nox > Command ansible-lint -c /workspaces/ansible-role-visual_cpp_redistributable_packages/repos/infra-automation-ansible-role/ansible_lint/ansible_lint.yml --project-dir . --exclude .git/ --exclude repos/ --exclude '.nox*/' --exclude '.venv*/' failed with exit code 2
nox > Session ansible-lint failed.
how to skip this validation in anisble lint or how to noqa for this specific task
Beta Was this translation helpful? Give feedback.
All reactions