You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FROM python:3.6
WORKDIR /usr/src/app
RUN pip install git+https://github.com/ansible-community/ansible-lint "ansible"
RUN ansible --version
RUN ansible-lint --version
RUN echo "---\n- hosts: localhost\n gather_facts: no\n tasks:\n\
- name: Reproduce the bug in the rule 602\n shell: |\n\
var=\$(pwd)\n if [[ \"\$var\" == \"\" ]]; then echo test; fi\n changed_when
RUN cat test.yml
RUN ansible-lint --force-color --show-relpath test.yml
- rewrite matching to avoid line processing and trigger only on when
blocks, highly reducing the chance of false-positives
- add additional pass test to avoid future regression
- refactor rule to use embedded tests
Fixes: #1232
- rewrite matching to avoid line processing and trigger only on when
blocks, highly reducing the chance of false-positives
- add additional pass test to avoid future regression
- refactor rule to use embedded tests
Fixes: #1232
Summary
Linter finds an error of the rule 602 in shell code
Issue Type
Ansible and Ansible Lint details
OS / ENVIRONMENT
Run in docker. Dockerfile:
STEPS TO REPRODUCE
docker build --rm -f Dockerfile .
Desired Behaviour
No error message
Actual Behaviour
Please give some details of what is actually happening.
Include a minimum complete verifiable example with:
ansible-playbook --syntax-check playbook
The text was updated successfully, but these errors were encountered: