Home Roadmaps Scripting Language
Stage 3 of 7 · Automate Everything

Pick Up a Scripting Language

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.

Updated May 2026 · 4 Weeks · 7 Stages

← Previous
Next →

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.

Your 7-Stage Scripting Roadmap

1

Why Python? Choosing Your First Language

Start Here

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.

Python 3 (latest) pip (package installer) VS Code + Python extension Interactive REPL (python3)
2

Python Basics — Just Enough to Be Dangerous

Core Skills

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.

Variables & data types if / elif / else for & while loops Functions (def) Lists & dictionaries
3

Write Your First Automation Script

Build Something Real

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.

os & pathlib (file handling) requests (HTTP calls) subprocess (run shell commands) sys.argv (command line args)
4

Bash Scripting — Glue for the Terminal

Linux + Scripts

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.

#!/bin/bash scripts Variables & conditionals for loops in Bash Exit codes ($?) Cron jobs (schedule scripts)
5

YAML — The Language of DevOps Config

Essential Format

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.

Key-value pairs Lists with dashes ( - ) Nested indentation (spaces only) Multi-line strings YAML linting tools
6

JSON — How the Internet Talks to Itself

API Fluency

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.

JSON structure & syntax json.loads() & json.dumps() Parsing nested JSON in Python jq (command-line JSON tool) REST API basics
7

Put It All Together — A Real DevOps Script

Capstone

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.

Python + YAML config files Python + JSON API responses Bash + Python together argparse (CLI arguments) Error handling (try/except)

Realistic Timeline (1 Hour a Day)

Day 1–3 Day 4–9 Day 10–14 Day 15–19 Day 20–23 Day 24–27 Day 28–30

4 Rules to Learn Scripting Fast

🤖

Automate Your Own Life

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.

📦

Use the Standard Library First

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.

🐛

Read Error Messages Carefully

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.

📁

Keep All Scripts in Git

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.

Ready for the next stage?

Continue to Understand Cloud Basics →

Continue to Stage 4: Cloud →