News for hackers. Stuff that matters.
Re:Lessons Learned from Writing Over 300k Lines of Infrastru... by ams6110 on Monday November 26, 2018 @07:00PM (#18537963)
I would say it's be smart about it.

I use Ansible quite a bit. When I first started, based on some examples I found, my play books were pretty complicated, with a lot of conditional steps, doing things (or not) based on results of previous steps, etc.

What I found is that it's a lot easier to have a lot of roles that each do one little thing, and then use them in a play book as needed.

A role might be as simple as installing a package, templating a configuration file, or maybe even just changing just one line in a config file.

When roles are small and do just one thing, they are easy to combine in many different ways, and it's more obvious what's going on.

There are no comments on this comment yet.