
A sysadmin's guide to Ansible: How to simplify tasks - mzehrer
https://opensource.com/article/18/7/sysadmin-tasks-ansible
======
kqr
I have always manually done the few sysadmin tasks I do, but recently had
reason to learn automation tools. At my current job, I use Ansible because
that's what the rest of the team does. However, in my spare time, I discovered
CFEngine 3.

I would have assumed, given my background of manually performing these tasks,
that I would immediately be attracted to Ansible over CFEngine. As it turns
out, not at all. Now that I have played around with CFEngine, I keep bumping
into issues where it feels like Ansible is in my way, or forces me to do
things the complicated way.

I know a lot of people disliked the earlier versions of CFEngine, and I do
realise the documentation is kind of so-so even for the current versions. But
despite these things, what makes people prefer something like Ansible over
CFEngine?

~~~
dozzie
My guess is that it's because learning a different paradigm is difficult and
you don't see its benefits until you're proficient with it. It's like learning
functional or logic programming.

Ansible gives you merely a way to execute commands on remote servers. Much
touted idempotency is not a game changer, it's quite easy to achieve even if
you write everything yourself.

CFEngine requires a different mindset, you need to (a) think of the servers
running independently and (b) configure _groups_ (classes) of servers, not
individual servers, even grouped in a list of some kind, like Ansible works.
Suddenly an environment becomes much easier to manage.

------
IdontRememberIt
I have enjoyed using Ansible, but I learn and deliver more using simple bash
script. I integrated several "concepts" from Ansible in my scripts:
idempotence and vault. If my infrastructure were larger, more complexe or
required frequent modifications, I would reconsider Ansible again.

~~~
nsomaru
How do you implement idempotency? Are any of your scripts open source?

~~~
IdontRememberIt
I work for a private company, I do not own the code, so I cannot open source
it, sorry. :( But if you break your scripts in small parts, it is easy to make
it idempotent.

------
irl_zebra
Ugh that giant social media sharing platter in the bottom is unremovable on
the phone and takes up a bunch of real estate. Going to try to view this on my
computer, but for now don't bother if you're on mobile.

~~~
crtasm
Renders fairly small here, I didn't even notice it. Block addtoany.com to get
rid of it.

