PyratLabs / ansible-role-k3s

Ansible role for installing k3s as either a standalone server or HA cluster.
BSD 3-Clause "New" or "Revised" License
635 stars 135 forks source link

Fix(tests): Resolve Ansible Lint warnings and fix Molecule tests on GitHub Actions #202

Closed dbrennand closed 1 year ago

dbrennand commented 1 year ago

TITLE

Summary

Fix Ansible Lint warnings and resolve Molecule tests failing.

Molecule v5.0.0 dropped support for lint, see https://github.com/ansible-community/molecule/pull/3802 so I created a separate CI job for running yamllint and ansible-lint.

To fix the molecule tests, I've removed the lint section and lint test scenario from each molecule.yml file. Furthermore, the Molecule tests were failing, and I suspect this was because ubuntu-latest was updated to Ubuntu 22.04 sometime ago and cgroups v2 was causing all tests to fail. I saw similar issues in https://github.com/dbrennand/ansible-role-caddy-docker/pull/6/commits/2d23b794fa111c3a018a077a78a4f1d3c652a9ae and I resolved by dropping to ubuntu-20.04 to get the tests in a working state again.

Issue type

Test instructions

N/A

Acceptance Criteria

Additional Information

dbrennand commented 1 year ago

Ready for PR @onedr0p 🙂

onedr0p commented 1 year ago

Great work here @dbrennand . Thanks!

I need to bug @xanmanning and see what is needed to cut a release.

dbrennand commented 1 year ago

Great work here @dbrennand . Thanks!

I need to bug @xanmanning and see what is needed to cut a release.

No worries 🙂 - Glad I could help 😄

Help us @xanmanning, you're our only hope! 😆 🙂

onedr0p commented 1 year ago

For now with we could pin our galaxy config to the hash... eg.

roles:
  - name: xanmanning.k3s
    src: https://github.com/PyratLabs/ansible-role-k3s.git
    version: de1bd094e55b4c7b796bafc83fc55e6cb157b14f
xanmanning commented 1 year ago

Great work here @dbrennand . Thanks! I need to bug @xanmanning and see what is needed to cut a release.

No worries slightly_smiling_face - Glad I could help smile

Help us @xanmanning, you're our only hope! laughing slightly_smiling_face

Apologies, been living under a rock for a few months.

Done some releasin'

Thanks for the hard work @dbrennand and @onedr0p !