Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ansible-lint fails validating github workflows due their use of "on:" keyword #3645

Closed
johanneskastl opened this issue Aug 4, 2023 · 2 comments · Fixed by #3698
Closed
Assignees
Labels
Milestone

Comments

@johanneskastl
Copy link
Contributor

This is the same issue as reported in the old ansible-lint-action

Summary

ansible-lint fails while validating the .github/workflows/ansible-lint.yml file.

Example: https://github.com/johanneskastl/ansible-role-obs_server/actions/runs/5759297496/job/15613149480

Issue Type
  • Bug Report
OS / ENVIRONMENT

GitHub action installed as documented in the marketplace readme

STEPS TO REPRODUCE

Add .github/workflows/ansible-lint.yml file to repo, push, let the action run.

Desired Behavior

The action should either ignore the workflows files or it should spit out a useful warning, that is actually related to the file's contents. There is no "truthy value" in that file at all, and not in line 2...

Actual Behavior

The action files due to an error in the workflows file:
https://github.com/johanneskastl/ansible-role-obs_server/actions/runs/5759297496/job/15613149480

@johanneskastl johanneskastl added bug new Triage required labels Aug 4, 2023
@ssbarnea
Copy link
Member

This is not really a bug in ansible-lint and is caused by Github not following the YAML specification. Read adrienverge/yamllint#430 for details.

We currently do not plan to do anything about it. If you want, you can add .github folder to exclude to avoid being annoyed by this.

@ssbarnea ssbarnea closed this as not planned Won't fix, can't repro, duplicate, stale Aug 22, 2023
@ssbarnea ssbarnea removed the new Triage required label Aug 22, 2023
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645

Updates the toolbox reop 'generate_ansible_default_settings'
option to enforce the linting of the parameters and constants.
ccamacho added a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645

Updates the toolbox repo 'generate_ansible_default_settings'
option to enforce the linting of the parameters and constants.
kpouget pushed a commit to ccamacho/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]'
to avoid skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645

Updates the toolbox repo 'generate_ansible_default_settings'
option to enforce the linting of the parameters and constants.
kpouget added a commit to openshift-psap/topsail that referenced this issue Aug 29, 2023
This commit resolves the following lint rules:

- 'yaml'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'no-changed-when'

It moves 'yaml' to 'yaml[indentation]' and 'yaml[line-length]' to avoid
skipping rules that are needed.

Adds an exclusion folder for the .github folder due to
ansible/ansible-lint#3645

Updates the toolbox repo 'generate_ansible_default_settings' option to
enforce the linting of the parameters and constants.

Partially solves: #10
@ssbarnea ssbarnea changed the title ansible-lint fails validating the .github/workflows/ansible-lint.yml ansible-lint fails validating github workflows due their use of "on:" keyword Aug 30, 2023
@ssbarnea ssbarnea self-assigned this Aug 30, 2023
@ssbarnea ssbarnea reopened this Aug 30, 2023
@ssbarnea ssbarnea added this to the 6.19.x milestone Aug 30, 2023
@johanneskastl
Copy link
Contributor Author

Thanks for the hints and explanation, @ssbarnea !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants