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
Ansible best practice defines YAML files to be specified with a yml extension. ansible-galaxy init also ENFORCES this behavior when templating collections and roles; the use of .yaml is accepted throughout documentation as valid but .yml is always preferred in all of their use cases, examples, and documentation.
$ ansible-lint --versionansible-lint 24.2.2 using ansible-core:2.16.5 ansible-compat:4.1.11 ruamel-yaml:0.18.6 ruamel-yaml-clib:0.2.8(ansible)
ansible installation method: pip
ansible-lint installation method: pip
STEPS TO REPRODUCE
Place changelog files in the following locations and run ansible-lint:
file location | ansible-lint | interpretation
--------------------------------------|--------------|----------------
collection/changelog.yaml | no detect | correct.
collection/CHANGELOG.yaml | no detect | correct.
collection/CHANGELOG.yml | no detect | correct.
collection/changelog.yml | no detect | correct.
collection/CHANGELOG.md | detect | correct.
collection/changelog.md | no detect | correct.
collection/CHANGELOG.rst | detect | correct.
collection/changelog.rst | no detect | correct.
collection/changelogs/changelog.yaml | detect | correct.
collection/changelogs/CHANGELOG.yaml | no detect | correct.
collection/changelogs/CHANGELOG.yml | no detect | correct.
collection/changelogs/changelog.yml | no detect | incorrect: accept '.yml'.
collection/changelogs/CHANGELOG.md | no detect | correct.
collection/changelogs/changelog.md | no detect | correct.
collection/changelogs/CHANGELOG.rst | no detect | correct.
collection/changelogs/changelog.rst | no detect | correct.
Desired Behavior
ansible-lint should honor accepted best practices from ansible themselves, and
ether:
Enforce .yml extension over .yaml.
Allow both .yml and .yaml extensions as valid YAML files.
It should be noted that lint enforces.yml extensions for other lints; such as galaxy[no-runtime] rule:
galaxy[no-runtime]: meta/runtime.yml file not found.
galaxy.yml:1
Actual Behavior
.yml changelog files are explicitly failed to be detected. Additionally
capped naming conventions for important user consumer documentation are not
followed.
The text was updated successfully, but these errors were encountered:
If there was a PR to address this, and it was merged, I presume we would also want to make a PR within the galaxy-importer repository? Basing this on the work done here, #2832. @ssbarnea
Summary
Ansible best practice defines YAML files to be specified with a
yml
extension.ansible-galaxy init
also ENFORCES this behavior when templating collections and roles; the use of.yaml
is accepted throughout documentation as valid but.yml
is always preferred in all of their use cases, examples, and documentation.Some relevant docs (many more):
Issue Type
OS / ENVIRONMENT
STEPS TO REPRODUCE
Place changelog files in the following locations and run
ansible-lint
:Desired Behavior
ansible-lint should honor accepted best practices from ansible themselves, and
ether:
.yml
extension over.yaml
..yml
and.yaml
extensions as valid YAML files.It should be noted that lint enforces
.yml
extensions for other lints; such asgalaxy[no-runtime]
rule:Actual Behavior
.yml
changelog files are explicitly failed to be detected. Additionallycapped naming conventions for important user consumer documentation are not
followed.
The text was updated successfully, but these errors were encountered: