The internet normally recommends the following snippet to configure molecule lint:
lint: |
set -e
yamllint .
ansible-lint .
Sometimes there is also an additional flake8. But Lets ignorethis for a while.
I have two issues with that:
First, the first problem will have the corresponding tool return an exit code a nonzero and thus terminate the pipeline. I have the impression that in real life it is almost impossible to use standard rules and have ansible content which reports no errors.
Secondly, I understand ansible-lint will internally run yamllint and report the issues detected by yamllint. Thus it seems redundant to invoke yamllint explicitly before invoking ansible-lint. Especially because ansible-lint will use a custom configuration for yamllint. And this custom configuration will differ from default configuration used by yamllint.
Would it not be better to invoke only ansible-lint and don't get confused by conflicting problem reports?
It would be nice if the documentation at https://molecule.readthedocs.io/en/latest/configuration.html#lint would elaborate on this or at least mention the fact that on has to configure the rules.