devops

Ansible Tags Explained: Run and Skip Tasks in Playbooks

Learn Ansible tags to run or skip selected playbook tasks at runtime with --tags, --skip-tags, always, never, play and role tags, and safe partial runs.

Deepak Prasad13 min read
devops

Ansible Loops Explained with loop, until, retries and delay

Learn Ansible loops with loop, loop_control, register results, when per item, until retries and delay, and when to use wait_for instead of looping.

Deepak Prasad14 min read
devops

Ansible Handlers Explained: Restart Services Only When Tasks Change

Learn Ansible handlers with notify, service restarts, execution order, listen, flush_handlers, loops, roles, changed_when pitfalls, and common troubleshooting mistakes.

Deepak Prasad17 min read
devops

Working with managed nodes with password (not passphrase)

Connect Ansible to managed nodes with SSH passwords using --ask-pass (-k), understand -K vs -k, sshpass requirements, and when key-based auth is still preferred on Rocky Linux 10.

Deepak Prasad4 min read
devops

Ansible Inventory Files: INI, YAML, Groups, and Variables

Learn how Ansible inventory files list hosts and groups in INI or YAML, where to place variables, how parent and child groups work, and how to verify with ansible-inventory and ping on Rocky Linux 10.

Deepak Prasad13 min read
devops

How to Configure ansible.cfg for Ansible Projects on Linux

Configure ansible.cfg at the project root—search order, defaults, inventory path, remote_user, become, roles_path, and verification with ansible --version and ansible-config on Rocky Linux 10.

Deepak Prasad11 min read
devops

How to Install Ansible on Rocky Linux 10

Install Ansible on Rocky Linux 10 using ansible-core, EPEL collection RPMs, pipx, or pip. Add ansible-navigator, Podman, verify versions, and run your first ping test.

Deepak Prasad14 min read
devops

Create Ansible Roles and Install Roles from Ansible Galaxy

Create Ansible roles with ansible-galaxy init, customize tasks, defaults, handlers and templates, install Galaxy roles, and pin versions in requirements.yml.

Deepak Prasad11 min read
devops

Ansible Vault Tutorial: Encrypt Variables, Files and Passwords

Learn Ansible Vault to encrypt files and variables with create, view, edit, encrypt, decrypt, rekey, vault IDs, password options, and secure group_vars and host_vars usage.

Deepak Prasad10 min read
devops

RHCE EX294 Exam Objectives Explained with Ansible Study Plan

RHCE EX294 objectives explained as a practical Ansible study plan, with RHCSA task mapping, ansible-navigator focus, Rocky Linux lab guidance, and GoLinuxCloud course links.

Deepak Prasad10 min read
devops

include_tasks vs import_tasks in Ansible: Difference and Examples

Compare Ansible import_tasks and include_tasks for static vs dynamic task loading, with conditions, loops, tags, apply, list-tasks behavior, and when to use each.

Deepak Prasad11 min read
devops

Ansible when Conditional Explained with Facts and Variables

Learn Ansible when conditionals with variables, facts, registered output, lists, dictionaries, loops, block and role level conditions, and common mistakes.

Deepak Prasad10 min read
devops

Ansible Variable Precedence Explained with group_vars and host_vars

Learn Ansible variable precedence with a practical order for group_vars, host_vars, play vars, vars_files, role defaults, role vars, and extra vars, plus debugging with ansible-inventory and debug tasks.

Deepak Prasad11 min read
devops

Write Your First Ansible Playbook: Package, Service, File, and Copy

Write your first Ansible playbook step by step—project layout, package and service tasks, file and copy modules, become, simple vars, syntax check, check mode, and PLAY RECAP.

Deepak Prasad10 min read
devops

How to Run Ansible Playbooks with ansible-playbook and ansible-navigator

Run Ansible playbooks with ansible-playbook and ansible-navigator—inventory, --limit, --syntax-check, --check, --diff, verbosity, tags, become, extra vars, and stdout mode.

Deepak Prasad13 min read
devops

Ansible Playbook Structure Explained: Plays, Tasks and Modules

Learn Ansible playbook structure—plays, tasks, modules, hosts, become, vars, handlers, multiple plays, execution order, validation, and common layout mistakes.

Deepak Prasad11 min read
devops

Ansible command vs shell vs raw Module: When to Use Each

Compare Ansible command, shell, and raw modules—pipes, argv, creates, removes, changed_when, Python bootstrap, security risks, and when to use dedicated modules instead.

Deepak Prasad17 min read
devops

What is Ansible? Architecture, Components and How It Works

Learn what Ansible is, how agentless automation works, and how control nodes, inventory, modules, playbooks, roles, collections, and vault fit together on Rocky Linux.

Deepak Prasad21 min read
devops

Ansible Operators and Jinja2 Tests in when Conditions

Learn Ansible comparison and logical operators, Jinja2 tests such as is defined, and safe when expressions for strings, lists, dictionaries, facts, and registered task results.

Deepak Prasad12 min read
devops

YAML Syntax for Ansible Playbooks with Examples

Learn YAML syntax for Ansible playbooks—indentation, lists, dictionaries, strings, booleans, multiline values, common mistakes, and ansible-playbook --syntax-check validation.

Deepak Prasad10 min read
devops

Ansible Facts and Custom Facts Explained

Learn Ansible facts from the setup module—OS, network, memory, mounts, and Python—plus fact filters, gather_facts control, custom facts.d files, and ansible_local in playbooks and templates.

Deepak Prasad9 min read
devops

Ansible Ad Hoc Commands Explained with Examples

Learn Ansible ad hoc command syntax with ping, command, shell, package, service, file, copy, user, become, --limit, check mode, troubleshooting, and playbook migration examples.

Deepak Prasad14 min read
devops

Ansible Roles Explained: Directory Structure, Defaults, Vars and Handlers

Learn Ansible roles with a tested demo: directory structure, tasks, handlers, defaults vs vars, variable placement, role dependencies, and when to use roles, include_role, or import_role.

Deepak Prasad13 min read
devops

Ansible Tutorial for Beginners [RHCE EX294 Exam]

Free, hands-on Ansible tutorial for beginners that takes you from zero to RHCE EX294. Rocky Linux 10 lab setup, playbooks, roles, vaults, and AWS provisioning — 49 lessons across 12 chapters, every example tested on …

Deepak Prasad1 min read
devops

Stop All Docker Containers: Commands, Examples, and Safe Shutdown

Stop all running Docker containers with docker stop $(docker ps -q), handle empty lists safely, adjust timeouts, force-kill stuck containers, filter by label, and shut down Compose stacks without data loss.

Deepak Prasad6 min read
devops

Error: can only create exec sessions on running containers

Explore solutions to the Docker error 'can only create exec sessions on running containers: container state improper.

Deepak Prasad4 min read
devops

Keep Docker Container Running (5 Easy Methods + Examples & Best Practices)

Learn how to keep a Docker container running using multiple methods like TTY mode, entrypoint, sleep infinity, and process management. Fix containers exiting immediately with practical examples and best practices.

Deepak Prasad4 min read
devops

Override Docker Entrypoint (How to Change CMD & ENTRYPOINT with Examples)

Learn how to override Docker ENTRYPOINT and CMD using docker run options. Understand the difference between ENTRYPOINT and CMD with practical examples and best practices.

Deepak Prasad4 min read
devops

Docker ps -a Explained (List All Containers with Examples & Filters)

Learn how to use docker ps -a to list all containers including stopped ones. Explore examples, filters, and output details to manage Docker containers effectively.

Deepak Prasad3 min read
devops

SSH into Docker Container [3 Simple Methods]

There are 3 different possible methods to perform docker container SSH. Using docker exec, docker attach and by running a SSHD service inside a container and using SSH client to connect to container

Deepak Prasad7 min read