惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
T
Threatpost
G
Google Developers Blog
T
Threat Research - Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
Google DeepMind News
Google DeepMind News
Cyberwarzone
Cyberwarzone
T
The Blog of Author Tim Ferriss
Know Your Adversary
Know Your Adversary
Hacker News: Ask HN
Hacker News: Ask HN
www.infosecurity-magazine.com
www.infosecurity-magazine.com
S
Schneier on Security
B
Blog
V2EX - 技术
V2EX - 技术
NISL@THU
NISL@THU
C
CERT Recently Published Vulnerability Notes
W
WeLiveSecurity
C
Cybersecurity and Infrastructure Security Agency CISA
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Y
Y Combinator Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Spread Privacy
Spread Privacy
The Last Watchdog
The Last Watchdog
V
Vulnerabilities – Threatpost
N
Netflix TechBlog - Medium
Schneier on Security
Schneier on Security
F
Fortinet All Blogs
N
News | PayPal Newsroom
Attack and Defense Labs
Attack and Defense Labs
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Microsoft Security Blog
Microsoft Security Blog
S
Security @ Cisco Blogs
人人都是产品经理
人人都是产品经理
爱范儿
爱范儿
P
Privacy & Cybersecurity Law Blog
P
Proofpoint News Feed
Project Zero
Project Zero
I
Intezer
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - Franky
SecWiki News
SecWiki News
Martin Fowler
Martin Fowler

Dizzy zone

Pangolin Private Resources With Domain Https About Redis is fast - I'll cache in Postgres n8n and large files Malicious Node install script on Google search Wrapping Go errors with caller info BLAKE2b performance on Apple Silicon State of my Homelab 2025 My homelabs power consumption On Umami ML for related posts on Hugo Probabilistic Early Expiration in Go SQLC & dynamic queries Enums in Go Streaming Netdata metrics from TrueNAS SCALE SQL string constant gotcha Moving from Jenkins to Drone My new server: MSI Cubi 3 Silent Profiling gin with pprof How I host this blog, CI and tooling Refactoring Go switch statements OAuth with Gin and Goth I made my own commenting server. Here's why. Why I hate OpenApi(swagger) IDE for GO Jenkins on raspberry pi 3 How I started my professional career Kestrel vs Gin vs Iris vs Express vs Fasthttp on EC2 nano Go's defer statement Self-hosted disqus alternative for 5$ a month Why I like go Speeding hexo (or any page) for PageSpeed insights Starting a blog with hexo and AWS S3
My thoughts on Ansible®
Vik · 2019-02-19 · via Dizzy zone

I’ve written about the infrastructure behind this blog in a previous post and the major issue with it currently is the old laptop I have at home that’s running the Jenkins instance. I really have no way of backing it all up. I’ve asked around a bit and the reddit thread I’ve made pointed me towards moving it all towards Ansible. Since people are using Ansible at work I thought it would be appropriate for me to try it as well.

So what I ended up doing is writing a playbook that will allow me to set everything up on a fresh machine. I’m not going to go into much detail of the process itself or look at the playbook instead, I’ll do a short summary of what I’ve learned on my way there. I’m not an expert in it by any means nor am I any good at it so do take everything you see here with a grain of salt.

So what’s this Ansible thing anyway?

Well, Ansible is an open source configuration management and application deployment tool. There’s probably a lot more to it than I just wrote but those are the parts I’ve had contact with so far. In essence Ansible allows you to define collections of scripts (called playbooks) that define what should be installed and run in a server. This is exactly what I was looking for as I wanted to create a portable script that I can easily use to replicate my at home infrastructure setup in case my laptop burns to death. You write a yaml file containing all the steps needed to install and run the required pieces of the puzzle.

I was a bit confused at first as to why this is any better than bash but after using it for a while, it starts to make sense. With bash you’d have to write a whole lot of boilerplate checking what has already been installed, what has already been run and what not. Ansible does that for you, it keeps track of what was run on which server so it does not perform the steps it does not need to perform. I would elaborate on the way it does this but I’ve honestly no clue and don’t think I need to know. All I know is it does and seems to do it very well.

Another layer above bash is called modules. These allow for easily performing common tasks, such as interacting with yum, pip or docker. There’s plenty of modules to choose from so Ansible comes with a whole lot of functionality out of the box. It also handles secrets quite well - you can encrypt and decrypt secrets quite easily. Once you’ve got a playbook setup it becomes trivial to scale to as many servers as you like. In short, it’s a great tool for deploying stuff.

It’s great but I hate using it

Not everything went as smoothly as I had anticipated though. It took me quite a bit of time to get my first playbook going. I won’t lie - I had a couple of examples to go by from work which did help me. Even so I found it rather frustrating having to do everything the Ansible way.

It feels that you need to spend a lot of time familiarizing yourself with Ansible prior to using it properly. I had to learn the tool to use it properly although I already have the knowledge how to set up my machine. While trying to write an Ansible playbook it feels as if I’m not learning anything useful. All I’m learning is a concrete implementation of infrastructure as code defined in yaml. I’m learning the concrete data structures that I need to define for Ansible to behave the way I’d expect it to. I’m having to familiarize myself with the way Ansible handles folder structures in my playbook. One could say it’s hidden behind a steep learning curve. This would be fine - I’m not against learning something that’s rather hard to do at first - I’m totally up for a challenge. But here I feel I’m not gaining any long term value. Ansible might be a good solution now but with the rapid way technology evolves now it might not last as long as I wish.

With Ansible I feel it wraps everything too nicely and I struggled to find the long lasting benefit and therefore the motivation to continue learning as I do not see how any of what I was learning was portable in the long run.

I’m not the target audience

I don’t mean to bash on Ansible. It’s a great tool at the hands of someone who can actually use it. However, I’m not that person, nor I intend to be. I really wanted to take it, make a simple script to deploy my infra in half an hour, commit it, push it and forget about it till the heat death of the universe. It turned out to be way too complex for that and it shows that I’ve probably taken a wrong tool for the job. What I probably need is a GUI layer on top of Ansible, called “Ansible for dummies” where I could click and drag and drop instead of touching yaml. Oh and I’ve mentioned in the past that I’m not a fan of yaml.

All in all - I’m happy I managed to finish the playbook but I’ll be happier still if I don’t have to do it again.