techno-tim / k3s-ansible

The easiest way to bootstrap a self-hosted High Availability Kubernetes cluster. A fully automated HA k3s etcd install with kube-vip, MetalLB, and more. Build. Destroy. Repeat.
https://technotim.live/posts/k3s-etcd-ansible/
Apache License 2.0
2.41k stars 1.05k forks source link

Change to FQCN with ansible-lint fixer #553

Closed rholmboe closed 2 months ago

rholmboe commented 3 months ago

Proposed Changes

Since ansible-base 2.10 (later ansible-core), FQCN is the new way to go.

Updated .ansible-lint with a production profile and removed fqcn in skip_list. Updated .yamllint with rules needed.

Ran ansible-lint --fix=all, then manually applied some minor changes.

Checklist

berendt commented 3 months ago

I think this only makes sense if a CI test is also added to ensure that automatic formatting is always applied in future. We do this with Black for Python, for example. A test runs in the CI that executes Black and if it makes changes, the test fails.

rholmboe commented 3 months ago

I think this only makes sense if a CI test is also added to ensure that automatic formatting is always applied in future. We do this with Black for Python, for example. A test runs in the CI that executes Black and if it makes changes, the test fails.

According to already defined CI jobs, it will execute pre-commit run which includes ansible-lint test that will fail if something isn't according to configured standard. So already in place

timothystewart6 commented 2 months ago

Hey, thank you! Sounds good! I want to get a few PRs merge in first, which might break your PR but you should be able to fix it easily with ansible-lint --fix=all rather than breaking all of the other current PRs.

timothystewart6 commented 2 months ago

@rholmboe sorry about the wait but I wanted merge the other PRs before this since this PR has a lot of style changes.

rholmboe commented 2 months ago

@rholmboe sorry about the wait but I wanted merge the other PRs before this since this PR has a lot of style changes.

No worries, let me know when I can resolve conflicts and upload a new patch.

berendt commented 2 months ago

@rholmboe sorry about the wait but I wanted merge the other PRs before this since this PR has a lot of style changes.

No worries, let me know when I can resolve conflicts and upload a new patch.

All pending PRs merged. I think you can do a rebase & resolve conflicts.

rholmboe commented 2 months ago

PR updated, ready for review

timothystewart6 commented 2 months ago

@rholmboe it seems like the build is failing.

rholmboe commented 2 months ago

@rholmboe it seems like the build is failing.

Yup, applied fix. yamllint failed on octal, something ansible-lint have in ignore.

timothystewart6 commented 2 months ago

Thank you!

rholmboe commented 2 months ago

@timothystewart6 no worries man, thank you for creating this and making life easier for the rest of us!