Is Ansible still worth learning?
Terraform and Kubernetes took the spotlight. Where Ansible still wins.
Terraform and Kubernetes took the spotlight. Where Ansible still wins.

Ten years ago, Ansible was everywhere. Configuration management was the heart of DevOps: Puppet, Chef, Salt and Ansible battled for servers. Then containers arrived, immutable infrastructure became fashionable, Terraform took over provisioning, and Kubernetes took over running applications.
People keep asking me: is Ansible still worth learning in 2026? My answer is yes, but for different reasons than before.
Think of the layers of modern infrastructure:
There's still a lot of that third category. Not everything runs in containers, and not every server is cattle.
Configuring operating systems. Hardening Linux servers, managing users and SSH keys, installing agents, configuring time sync and logging. Especially in on-premises environments, VMs that live for years, or bare metal.
Network automation. This is where Ansible is arguably stronger than ever. Switches, routers, firewalls and load balancers from Cisco, Juniper, Arista, F5, Palo Alto and many more have Ansible collections. Network teams use it heavily.
Day-2 operations. Rolling restarts, patching servers in batches, rotating certificates on old systems, running the same command across a hundred machines. The "orchestration of procedures" that doesn't fit Terraform's declarative model.
Bootstrapping. Preparing machines before Kubernetes or another platform takes over, like building a homelab or an on-prem cluster.
Legacy and hybrid environments. Most companies have them, and they need automating too.
Terraform builds the house, Kubernetes runs the apps inside, and Ansible is still the handyman who fixes everything else.
A simple playbook:
- name: Harden web servers
hosts: web
become: true
tasks:
- name: Ensure unattended upgrades are installed
ansible.builtin.apt:
name: unattended-upgrades
state: present
- name: Disable SSH password login
ansible.builtin.lineinfile:
path: /etc/ssh/sshd_config
regexp: '^#?PasswordAuthentication'
line: 'PasswordAuthentication no'
notify: Restart ssh
handlers:
- name: Restart ssh
ansible.builtin.service:
name: ssh
state: restarted
A newer addition worth knowing: Event-Driven Ansible lets you trigger playbooks automatically from events, like a monitoring alert, a webhook or a message on a queue. For example: when a disk-full alert fires, run a playbook that cleans up old logs and opens a ticket.
It's a nice bridge between observability and automation, especially in traditional IT environments.
If you use Ansible, use it well:
ansible.builtin.copy.If you work with Linux servers, on-premises infrastructure, network devices or hybrid environments: absolutely. It's quick to learn and immediately useful. If your world is 100% cloud-native Kubernetes, it's a nice-to-have rather than a must.
My take: Ansible isn't the star anymore, but it's still the most practical tool for the messy, real-world parts of infrastructure.
— Desly