Your first step into automation — a plain-English guide to Python, Bash, YAML, and JSON so you can make your computer do the boring work for you.
Why scripting? A DevOps engineer who can only click buttons is replaceable. A DevOps engineer who can automate those clicks with a script is invaluable. Scripting is how you stop doing the same task twice — instead you write it once, and the computer does it forever.
You don't need to become a software developer. You just need to be able to look at a repetitive task — backing up files, checking if a server is online, deploying code — and write 20 lines of Python or Bash that handles it automatically. That skill alone will make you stand out in any DevOps interview.
There are dozens of scripting languages — but for beginners, Python is the clear winner. It reads almost like plain English, has an enormous community, and is used in every corner of DevOps: automation scripts, cloud SDKs, monitoring tools, and AI pipelines all run on Python. Install Python, open a terminal, type python3, and write your very first line: print("Hello, DevOps!"). You've started.
You don't need to learn all of Python — just the parts that matter for automation. Focus on four things: variables (storing information), if/else (making decisions), loops (repeating actions), and functions (packaging reusable code). With just these four tools, you can already write scripts that do real, useful work. Skip the advanced stuff — classes, decorators, async — for now. Those come later.
The best way to learn scripting is to solve a real problem. Start small: write a Python script that reads a list of files in a folder and renames them automatically. Or one that checks if a website is responding and prints "UP" or "DOWN." Learn to work with files on disk using Python's built-in os and pathlib libraries, and use requests to talk to websites and APIs. Real problems beat tutorial exercises every time.
Python is your main language, but Bash scripting is the glue that holds Linux systems together. Almost every server has Bash scripts running silently in the background — doing backups, rotating logs, restarting crashed services. If you completed the Linux roadmap, you already know the individual commands. Now learn to chain them inside a .sh script with variables, conditions, and loops. It's simpler than Python, and incredibly powerful on Linux servers.
YAML is not a programming language — it's a way to write configuration files that humans can actually read. Nearly every DevOps tool you'll use — Docker Compose, Kubernetes, GitHub Actions, Ansible — is configured using YAML files. The rules are simple: indentation means everything, colons separate keys from values, and dashes create lists. Getting YAML wrong by one space breaks entire pipelines, so learn it properly from the start.
When your script talks to a cloud API — creating a server, reading a log, fetching metrics — the data comes back in JSON format. It looks like Python dictionaries: curly braces, key-value pairs, nested objects. Learn to read JSON, parse it in Python using the built-in json library, and pull out specific values from nested structures. This skill is what lets your scripts actually interact with cloud platforms, monitoring tools, and third-party services.
Your final milestone for this stage: write one complete automation script that combines everything. A good example — a Python script that reads a YAML config file listing servers, SSHs into each one, checks disk usage, and writes a JSON report. Or a Bash script that hits a REST API, parses the JSON response, and sends a Slack alert if something looks wrong. It doesn't need to be fancy. It just needs to be real and useful — that's what goes on your CV.
The best scripts solve your own problems. Rename your downloads folder? Resize photos in bulk? Auto-organise files by date? Your own annoyances are the best practice material.
Python ships with hundreds of built-in tools. Before reaching for a third-party package, check if Python already has it: os, json, datetime, csv — they're all free and built in.
Python's error messages are surprisingly readable. Don't ignore them — read the last line first. It almost always tells you exactly what went wrong and on which line.
Every script you write goes into a GitHub repo — even the messy ones. This is your automation portfolio. Future employers will look at it, and future-you will be glad it's backed up.
The goal of this stage isn't to become a programmer. It's to become someone who, when faced with a repetitive task, thinks: "I could write a script for this." That mindset — that instinct to automate — is what separates a good DevOps engineer from a great one.
Automate one real thing this week. Then another next week. That's all it takes.