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

Perform linting on Ansible playbooks #101

Merged
merged 5 commits into from
Mar 21, 2023

Conversation

konstruktoid
Copy link
Contributor

This PR:

Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
@konstruktoid
Copy link
Contributor Author

@apatard
Copy link
Member

apatard commented Feb 15, 2023

oh, thanks for doing it ! Btw, I already did some fixes in the past: #90. Since your PR is doing more, I'm happy to close mine. Nevertheless, I'm not seeing any alignment fixes for molecule/test-podman/verify.yml. Has this already been fixed ?

And for the galaxy failure, looks like we're getting it more and more. Not sure we can do anything. Maybe using GHA caching ? but I'm not sure it's a good idea or if it'll work.

Signed-off-by: Thomas Sjögren <[email protected]>
@konstruktoid
Copy link
Contributor Author

So sorry @apatard, I totally missed #90 ... and I also missed molecule/test-podman/verify.yml but that should be fixed now.

@apatard
Copy link
Member

apatard commented Feb 15, 2023

So sorry @apatard, I totally missed #90 ... and I also missed molecule/test-podman/verify.yml but that should be fixed now.

No worry. All that matter is that the lint issues are getting fixed. I've closed my PR.

Flake8 is giving errors about some empty lines in the code, so
remove the line to fix these errors.

Signed-off-by: Arnaud Patard <[email protected]>
@apatard
Copy link
Member

apatard commented Feb 24, 2023

pushed an extra commit to hopefully finishing linting issues. I hope you don't mind. Also, realized after pushing that this PR was about playbooks only, so fill free to kill my commit if wanted and I'll send a new PR

@konstruktoid
Copy link
Contributor Author

All good @apatard

@konstruktoid
Copy link
Contributor Author

I believe there's a need to restart a lot of tests due to yet more Galaxy issues, ansible-playbook -i'127.0.0.1,' -c local ./src/molecule_plugins/podman/playbooks/validate-dockerfile.yml works locally (tm).

@apatard
Copy link
Member

apatard commented Feb 27, 2023

yeah, same here. I don't remember having issues with it on my test vm... but on gha, it seems to happen a lot. I'm disappointed that there's no error message. I thought we were seeing them previously (unless I'm mixing with ansible-lint or molecule ci)

@konstruktoid
Copy link
Contributor Author

Yeah, previously (or maybe because of other causes) there was proper timeout error messages but this just fails.

Copy link
Member

@apatard apatard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm. yeah, it seems a good idea to skip experimental checks.

@apatard
Copy link
Member

apatard commented Mar 21, 2023

fyi, added a label to make the latest check green.

@konstruktoid
Copy link
Contributor Author

fyi, added a label to make the latest check green.

thanks, i dont have that power

@apatard apatard merged commit e179c3d into ansible-community:main Mar 21, 2023
@konstruktoid konstruktoid deleted the lint branch March 21, 2023 11:52
dankow pushed a commit to dankow/molecule-plugins that referenced this pull request Mar 31, 2023
* skip experimental rules

Signed-off-by: Thomas Sjögren <[email protected]>

* Lint ansible files

Signed-off-by: Thomas Sjögren <[email protected]>

* fix missed alignment

Signed-off-by: Thomas Sjögren <[email protected]>

* Fix blk100 flake8 errors

Flake8 is giving errors about some empty lines in the code, so
remove the line to fix these errors.

Signed-off-by: Arnaud Patard <[email protected]>

---------

Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Arnaud Patard <[email protected]>
Co-authored-by: Arnaud Patard <[email protected]>
ssbarnea added a commit that referenced this pull request Apr 5, 2023
* Docker: Add support for `platform` parameter

Pass `platform` value from `platforms.item` to `docker_container`. Example usage:
```
driver:
  name: docker
platforms:
  - name: test-01
    image: ...
    pre_build_image: true
    platform: linux/amd64
```

As suggested in the [docker_container documentation](https://docs.ansible.com/ansible/latest/collections/community/docker/docker_container_module.html#ansible-collections-community-docker-docker-container-module), ignore the `platform` parameter when comparing state.

Addresses issue #94.

* Trigger checks

* Fix ci issue (#111)

* Fix ci issue

* fix ci

* Optimize CI (#112)

Install collection from galaxy, fix typo, do not install ansible via apt-get

* README.md: Update plugin list (#91)

With newly added plugins, the list has to be updated.

Signed-off-by: Arnaud Patard <[email protected]>

* Perform linting on Ansible playbooks (#101)

* skip experimental rules

Signed-off-by: Thomas Sjögren <[email protected]>

* Lint ansible files

Signed-off-by: Thomas Sjögren <[email protected]>

* fix missed alignment

Signed-off-by: Thomas Sjögren <[email protected]>

* Fix blk100 flake8 errors

Flake8 is giving errors about some empty lines in the code, so
remove the line to fix these errors.

Signed-off-by: Arnaud Patard <[email protected]>

---------

Signed-off-by: Thomas Sjögren <[email protected]>
Signed-off-by: Arnaud Patard <[email protected]>
Co-authored-by: Arnaud Patard <[email protected]>

* [pre-commit.ci] pre-commit autoupdate (#93)

updates:
- [github.com/psf/black: 22.12.0 → 23.1.0](psf/black@22.12.0...23.1.0)
- [github.com/ansible/ansible-lint.git: v6.10.2 → v6.14.2](https://github.com/ansible/ansible-lint.git/compare/v6.10.2...v6.14.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* install python3 only when ansible_system == Linux (#110)

* assume windows when ansible_connection is winrm

Signed-off-by: Thomas Sjögren <[email protected]>

* replace raw: with package:

Signed-off-by: Thomas Sjögren <[email protected]>

* revert back to raw

Signed-off-by: Thomas Sjögren <[email protected]>

* use uname to check if it's a Linux system

Signed-off-by: Thomas Sjögren <[email protected]>

---------

Signed-off-by: Thomas Sjögren <[email protected]>

* Make selinux an optional extra (#89)

As our special selinux shim dependency also caused problems for
people that did not really need selinux, we now make it a simple
extra.

* Trigger checks

---------

Signed-off-by: Arnaud Patard <[email protected]>
Signed-off-by: Thomas Sjögren <[email protected]>
Co-authored-by: Jack <[email protected]>
Co-authored-by: Arnaud Patard <[email protected]>
Co-authored-by: Thomas Sjögren <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Sorin Sbarnea <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

molecule-podman converge.yml playbook linting issues a warning
2 participants