-
SummaryWhen using the last example from the docs i get a Issue Type
OS / ENVIRONMENTansible-lint --version
ansible-lint 6.14.2 using ansible 2.14.3
STEPS TO REPRODUCEmkdir tasks
echo '- name: Avoid hanging when http(s) password is missing
ansible.builtin.git:
repo: https://github.com/ansible/could-be-a-private-repo
dest: /src/from-private-repo
environment:
GIT_TERMINAL_PROMPT: 0' > tasks/test.yml
ansible-lint .
# (or alternatively)
docker run -it --rm -v $PWD:/data -w /data -u $(id -u):$(id -g) -e HOME=/tmp python:3 sh -c 'pip -q install --no-warn-script-location ansible-lint && export PATH=$PATH:/tmp/.local/bin/ && ansible-lint . --force-color' Desired BehaviorThe lint does not error Actual BehaviorWARNING Listing 2 violation(s) that are fatal
latest[git]: Result of the command may vary on subsequent runs.
tasks/test.yml:1 Task/Handler: Avoid hanging when http(s) password is missing
schema[tasks]: {'name': 'Avoid hanging when http(s) password is missing', 'ansible.builtin.git': {'repo': 'https://github.com/ansible/could-be-a-private-repo', 'dest': '/src/from-private-repo'}, 'environment': {'GIT_TERMINAL_PROMPT': 0}} is not valid under any of the given schemas
tasks/test.yml:1 Returned errors will not include exact line numbers, but they will mention
the schema name being used as a tag, like ``schema[playbook]``,
``schema[tasks]``.
This rule is not skippable and stops further processing of the file.
If incorrect schema was picked, you might want to either:
* move the file to standard location, so its file is detected correctly.
* use ``kinds:`` option in linter config to help it pick correct file type.
Read documentation for instructions on how to ignore specific rule violations.
Rule Violation Summary
count tag profile rule associated tags
1 schema[tasks] basic core
1 latest[git] safety idempotency
Failed after min profile: 2 failure(s), 0 warning(s) on 1 files. |
Beta Was this translation helpful? Give feedback.
Answered by
ssbarnea
Mar 15, 2023
Replies: 1 comment 1 reply
-
Please read the error, environment variables cannot be integers, just quote the 0 and it will pass the schema validation. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
MyIgel
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please read the error, environment variables cannot be integers, just quote the 0 and it will pass the schema validation.