Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: Curious about Ansible but afraid or blocked on getting started?
4 points by MaknMoreGtnLess on Feb 28, 2022 | hide | past | favorite | 9 comments
Are you curious about Ansible [0] for your CM, IaC needs but afraid or blocked on getting started?

1. What are some of the blockers 2. What will (significantly) improve for you if you became proficient in Ansible? 3. Are there some things that you just can't do right not but would be easuer if you became proficient in Ansible?

[0] https://en.wikipedia.org/wiki/Ansible_(software)




At the $dayjob I don't see anyone use ansible or comparable tools (chef, puppet, ...) any more. It's all managed cloud services and containers. Much of the job that ansible or other config management tools might have done is handled by docker build to bake container images, and k8s to manage custom running services. Terraform however gets widely used to wrangle state.


> Much of the job that ansible or other config management tools might have done is handled by docker build to bake container images, and k8s to manage custom running services

OK but there has to be something that executes the docker build and then kicks the jobs off - right?

What's that tool at the $dayjob?


> something that executes the docker build and then kicks the jobs off - right?

yep. there's build time and deploy time.

build time generally coincides with peer review: build happens because someone changes something, all changes are version controlled and get peer reviewed. so it's usually some combination of tools that can be integrated with and triggered by the code review tool. in prehistoric times the code review tool might trigger a CI workflow in jenkins which invokes a glue shell script to invoke specific build or test tools. these days the runner might be more tightly integrated into the code review system, such as a github or gitlab runner + using the runner's proprietary scripting language to call the same glue shell script to invoke the build tools.

At $day job the deploys that change real world state are coordinated and triggered by a meat layer of humans, they're not automatically triggered by commits getting merged, etc. A workflow automation system roughly equivalent to prehistoric jenkins is used to define manually triggered deployment jobs that are used to deploy to environments, those deploy jobs will typically invoke some kind of glue shell script that invokes terraform or kubectl or whatever, which will have the responsibility of coercing the environment into the desired state.


I am afraid of getting started, I have read playbooks before and they look understandable but the idea of setting up the tools scares me. I’m starting to think this is PTSD from how hard installing anything was back then and now trying anything new is hard even if the entry level for everything has been lowered significantly.


Ansible has a very low barrier to entry in terms of dependencies that need to be installed into the machines you want to manage: they need to have python 2.6+ or python 3.5+, and you need to be able to connect to the machines over ssh.

One way to get started could be to initially ignore ansible playbooks, just install ansible onto your control machine. Write an inventory file with one or more hostnames of machines you want to manage. See if you can get ansible to connect with ssh and "ping" all the machines. Once you're comfortable with executing one-off commands through ansible, the jump to ansible-playbook will be smaller.


> Ansible has a very low barrier to entry in terms of dependencies that need to be installed into the machines you want to manage: they need to have python 2.6+ or python 3.5+, and you need to be able to connect to the machines over ssh.

I understand what you're saying but do understand that to other people these can be concepts that they arn't familiar with or might actively struggle with

That said - were there any obstacles you faced when you started with Ansible?

What could have been better (tooling/docs/training/etc) to get you upto speed better/faster?


Shameless plug: https://hescaide.me/blog/2022/01/29/a-day-with-ansible/

This is after one day of interacting with Ansible. I did have previous experience with Linux and setting up Circle.ci projects and Dockerfile. There are not many concepts to grok. I just cloned a playbook on GitHub and tried to rewrite it to fit my needs, reading documentation over the part I did not understand well. No book or video tutorials were needed.


Much appreciated!


I want to learn from you more.

What if I gave you 2 docker containers:

1. one with ansible loaded and ready to go

2. another one with just SSH running that you can point the above to and experiment with

If you don't know docker - that's ok! It's easy and I will set you up to do that. let me know

This way, you don't have to mess around with either installing ansible or setting up VMsVPS/hosts blah blah




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: