yavdr / yavdr-ansible

ansible playbooks for yaVDR
GNU General Public License v3.0
11 stars 10 forks source link

Adopt automation good practices #26

Open ericzolf opened 2 years ago

ericzolf commented 2 years ago

As Ansible-practitioner, I must admit that the current code makes my eyes bleed from time to time (sorry for the tone, really just joking).

I would suggest to adopt some "better" practices, also for more consistency in the code. As basis I'd recommend https://github.com/redhat-cop/automation-good-practices which is maintained by the practitioners from Red Hat. That's anyway what I'm following for my contributions.

It doesn't mean that the existing code needs to be changed at once, just that we have a common basis to discuss about quality of PRs, i.e. future code. Anyway, I wanted to start the discussion.

seahawk1986 commented 2 years ago

As a hobbyist with a single larger Ansible project that is about four years older than the best practice guide I have to admit that I never heard of this document - especially the early Ansible documentation was also quite vague at times on how to do things - this feels a little like C++ where you can do a lot of nasty stuff supported by the standard and several years later there is a nice guide by Stroustrup, Sutter et al, that tells you how to do things with a subset of the language instead after there is tons of old code ...

That being said if it helps to improve readability and maintainability I am open to improvements.