security

65 Ansible tutorials tagged “security”. Working examples covering automation, configuration management, and DevOps workflows.

Ansible SNMP Monitoring Network Devices

networking · 8

Configure SNMP monitoring with Ansible for network devices, servers, and infrastructure including SNMPv3 security, trap receivers, and MIB management

Beginner

Ansible AppArmor — Manage Linux Security Profiles

playbooks · 4

Manage AppArmor security profiles with Ansible. Deploy custom profiles, switch enforcement modes, audit application access, troubleshoot denials.

Beginner

Ansible Auditd — Configure Linux Audit Framework

playbooks · 5

Configure the Linux audit framework (auditd) with Ansible. Deploy audit rules for file access, system calls, authentication, privilege escalation,.

Beginner

Ansible Fail2Ban — Automate Intrusion Prevention and Brute Force Protection

playbooks · 4

Deploy Fail2Ban with Ansible. Protect SSH, Nginx, Apache, and custom services from brute force attacks. Jail configuration, custom filters, whitelists,.

Beginner

Ansible HashiCorp Vault — Secrets Management and Dynamic Credentials

playbooks · 5

Integrate HashiCorp Vault with Ansible. Deploy Vault, manage secrets with lookup plugins, generate dynamic database credentials, PKI certificates.

Beginner

Ansible OpenSSL — Manage Certificates, Keys, and PKI

playbooks · 4

Manage OpenSSL certificates and keys with Ansible. Generate private keys, CSRs, self-signed certificates, CA infrastructure, certificate chains.

Intermediate

Ansible WireGuard VPN — Deploy Secure Mesh Networks

playbooks · 6

Deploy WireGuard VPN with Ansible. Point-to-site, site-to-site, and full mesh topologies. Key generation, peer management, firewall rules, and dynamic.

Beginner

Ansible WireGuard — Deploy Secure VPN Tunnels

playbooks · 5

Deploy WireGuard VPN with Ansible. Generate key pairs, configure site-to-site tunnels, remote access VPN, full mesh topology, DNS routing, kill switch,.

Beginner

Ansible iptables — Firewall Rules

playbooks · 6

Manage Linux iptables firewall rules with Ansible. Complete guide to ansible.builtin.iptables module — chains, rules, NAT, port forwarding, rate limiting,.

Beginner

EU Cyber Resilience Act (CRA) and Ansible — What You Need to Know

playbooks · 9

The EU Cyber Resilience Act (CRA) introduces mandatory cybersecurity requirements for software products. Learn how it impacts Ansible, Red Hat's Open.

Beginner

Ansible Vault encrypt_string vs vault file — Secrets Management

playbooks · 5

Compare Ansible Vault encrypt_string and vault files. Learn when to use inline encryption vs file encryption with practical examples and best practices.

beginner

Ansible for AI Security — Automate AI Platform Security and Guardrails

playbooks · 5

Secure AI deployments with Ansible. Automate LLM guardrails, model access control, GPU isolation, prompt injection defenses, and AI compliance scanning.

advanced

Ansible for Confidential Computing — Deploy TEE and Encrypted Workloads

playbooks · 5

Automate confidential computing with Ansible. Deploy Intel SGX, AMD SEV, and ARM CCA trusted execution environments for encrypted workloads.

advanced

Ansible for Digital Provenance — Content Authenticity and C2PA Automation

playbooks · 4

Automate digital provenance and content authenticity with Ansible. Deploy C2PA signing, content credentials, watermarking infrastructure, and verification.

advanced

Ansible Firewall — firewalld & UFW

playbooks · 5

Use Ansible to manage firewall rules with firewalld and UFW modules. Open ports, allow services, configure zones, and secure Linux servers.

beginner

Ansible for Post-Quantum Cryptography — Migrate TLS and SSH Keys

playbooks · 6

Automate post-quantum cryptography migration with Ansible. Deploy PQC-ready TLS certificates, SSH keys, and crypto libraries across your fleet.

advanced

Ansible SSH Key Management

playbooks · 5

Manage SSH keys with Ansible: add or remove authorized keys with authorized_key, generate key pairs, restrict keys, harden sshd, and rotate keys safely.

beginner

Ansible Vault — Encrypt Secrets

playbooks · 5

Encrypt passwords, API keys, and sensitive data with Ansible Vault. Create, edit, view, and decrypt vault files. String encryption, multi-vault, and best.

beginner

Ansible become — Privilege Escalation Guide (sudo, su)

playbooks · 5

How to escalate privileges in Ansible with become. Run tasks as root or other users with sudo, su, doas. Configure passwordless sudo and become_user.

beginner

Ansible firewalld and ufw Modules

playbooks · 6

Use Ansible to manage firewall rules with firewalld and ufw modules. Open ports, allow services, configure zones, and automate firewall policies.

intermediate

Ansible no_log: Hide Passwords & Secrets

playbooks · 4

Ansible no_log prevents passwords, API keys, and secrets from appearing in playbook output and logs. Learn when and how to use it.

beginner

Ansible Compliance — CIS STIG Hardening

enterprise · 7

Implement compliance as code with Ansible. Automate CIS benchmark enforcement, DISA STIG hardening, PCI-DSS controls, and continuous compliance auditing.

advanced

Managing Ansible Automation Platform Credentials at Scale with HashiCorp Vault

enterprise · 7

Integrate HashiCorp Vault with Ansible Automation Platform for credentials at scale. Configure dynamic secret lookups, token renewal, and custom EE support.

advanced

Ansible Configuration Drift Detection and Remediation

best-practices · 4

How to detect and fix configuration drift with Ansible using check mode, assert, and idempotent playbooks. Prevent server sprawl and compliance issues.

Beginner

Ansible Vault: Encrypt Secrets in Playbooks and Variables

playbooks · 4

Complete guide to Ansible Vault — encrypt files, variables, and strings. Learn create, edit, view, encrypt, decrypt commands with practical examples for.

Beginner

Ansible user Module — Users & Groups

playbooks · 4

Complete guide to the Ansible user module — create users, set passwords, manage groups, SSH keys, and home directories. Includes group module examples.

Beginner

ansible_password vs ansible_ssh_pass: SSH Authentication in Ansible

playbooks · 3

Learn the difference between ansible_password and ansible_ssh_pass in Ansible. Configure password-based SSH authentication with practical examples,.

Beginner

Fix Ansible Vault "Attempting to Decrypt but No Vault Secrets Found" Error

troubleshooting · 2

Resolve the Ansible Vault decryption error. Learn to pass vault passwords via --ask-vault-pass, password files, and environment variables.

beginner

Install SELinux with Ansible — RHEL 8

playbooks · 3

Learn how to use Ansible to install, configure, and enable SELinux on RHEL 8. Ensure security and compliance through automation.

Beginner

Automating SSL/TLS Certificate Rotation in AKS

cloud-virtualization · 4

Learn how to automate SSL/TLS certificate rotation in Azure Kubernetes Service (AKS) using Cert-Manager and custom scripts for seamless security.

Advanced

Fix Ansible SSH Connection Errors

playbooks · 3

Resolve Ansible SSH connection failures: host key verification, permission denied, unreachable hosts, timeout errors, and known_hosts issues.

Beginner

Ansible Vault Guide: Encrypt and Manage Secrets Securely

playbooks · 5

Complete Ansible Vault guide: encrypt files, strings, and variables. Learn vault create, edit, encrypt_string, multiple vault IDs, and integration with.

Advanced

Ansible no-log-password — Lint Rule Fix

playbooks · 4

Fix ansible-lint no-log-password warnings. When to use no_log: true for passwords, tokens, and secrets in Ansible tasks. Examples and best practices.

Beginner

Ansible troubleshooting — Error 305: command-instead-of-shell

playbooks · 6

Fix Ansible Lint Error 305 command-instead-of-shell — when to use command vs shell and why it matters for security and performance.

Beginner

Ansible WinRM over SSH — PSRP

playbooks · 5

Tunnel WinRM through SSH with PSRP for secure Ansible Windows automation. No HTTPS certificates needed. Configure SSH, PSRP, and firewall rules.

Beginner

Pluralsight The IT Ops Sessions: Ansible Sign, Verify, Event-Driven and Ansible Generative AI

cloud-virtualization · 5

How to use the "ansible-sign" command line utility to sign and verify using a GPG signature in your Ansible project, Event-Driven Ansible, Rulebooks.

Advanced

Ansible become — Privilege Escalation Guide

playbooks · 7

Master Ansible become for privilege escalation — sudo, su, doas, become_user, become_method, become_flags, passwords, and network enable mode. Complete.

Beginner

Ansible Sudo Password — Secure become

playbooks · 6

Configure sudo password for Ansible become. Use --ask-become-pass, ansible-vault encrypted vars, and NOPASSWD sudoers safely.

Beginner

Ansible CIS Hardening — RHEL 9

playbooks · 5

Discover how to automate CIS Benchmark hardening for RHEL 9 systems using Ansible. Simplify security compliance with the "ansible-lockdown" project for.

Advanced

Strengthening Security: Automating CIS Benchmark Hardening for RHEL 9 with Ansible

playbooks · 6

Automate CIS Benchmark hardening for RHEL 9 using Ansible with the Ansible Lockdown roles, ensuring robust security configurations across systems.

Advanced

Ansible no_log — Hide Sensitive Data

playbooks · 6

Complete guide to Ansible no_log directive. Learn how to hide passwords, API keys, and secrets from playbook output. Includes examples, debugging tips,.

Beginner

Ansible GPG Signature Verification

playbooks · 7

Learn how to GPG-sign an Ansible project using the ansible-sign command line tool. Watch a live Playbook by Luca Berton and transform your project from.

Beginner

Project signing with GPG and ansible-sign

playbooks · 7

How to sign an Ansible project using GPG and ansible-sign command line utility. With clear, copy-paste, step-by-step examples.

Beginner

Fix Ansible Vault — No Secrets Error

playbooks · 2

Learn to troubleshoot and resolve "Attempting to decrypt but no vault secrets found" error in Ansible Vault with a live Playbook and practical fix.

Beginner

Decrypt Ansible Vault — Complete ansible-vault Guide

playbooks · 4

Decrypt Ansible Vault files with ansible-vault decrypt. Complete guide covering password files, vault IDs, inline encrypted variables, and CI/CD.

Beginner

Use Ansible Vault in Ansbile Playbook — ansible vault

playbooks · 3

Learn how to use Ansible Vault to secure sensitive data such as passwords and access keys in your playbooks with practical examples and a live Playbook.

Beginner

Ansible Vault — Encrypt Secrets in Playbooks (Complete Guide)

playbooks · 6

Encrypt passwords, API keys, and sensitive files with Ansible Vault. Complete guide covering encrypt_string, vault files, multiple passwords.

Advanced

Deploy Kubernetes Resources with Ansible Playbook

playbooks · 4

Learn how to deploy Kubernetes resources using Ansible. Follow this guide to create namespaces, pods, and services with an Ansible playbook.

Beginner

Assign Memory to Kubernetes Pods with Ansible

playbooks · 9

Learn how to assign memory resources to Kubernetes or OpenShift containers and pods using Ansible. Follow our live Playbook and simple code examples.

Beginner

Configure a Pod to Use a Volume for Storage on Kubernetes or OpenShift with Ansible

playbooks · 8

Learn how to configure a Kubernetes or OpenShift Pod to use a volume for persistent storage with Ansible. This guide includes a live Playbook example.

Beginner

Ansible troubleshooting — Kubernetes K8s or OpenShift OCP 401 Unauthorized

playbooks · 4

Explore troubleshooting steps for Kubernetes 401 Unauthorized errors in Ansible when interacting with Kubernetes or OpenShift clusters.

Beginner

Optimize Kubernetes CPU Resources with Ansible Playbooks

playbooks · 4

Learn to assign CPU resources to Kubernetes and OpenShift pods using Ansible. Streamline your container management with effective resource configuration.

Beginner

Create Kubernetes K8s or OpenShift OCP Service — Ansible module k8s

playbooks · 5

How to automate the creation of "nginx-service" Service and "nginx" Pod in namespace "example" of Kubernetes K8s or OpenShift OCP with Ansible module k8s.

Beginner

Create Kubernetes K8s or OpenShift OCP Pod — nginx — Ansible module k8s

playbooks · 5

How to automate the creation of "nginx" Pod in namespace "example" of Kubernetes K8s or OpenShift OCP with Ansible module k8s.

Beginner

Create Kubernetes K8s or OpenShift OCP Secret — Ansible module k8s

playbooks · 5

How to automate the creation of “mysecret” secret in namespace “default” Kubernetes K8s or OpenShift OCP with Ansible module k8s.

Beginner

Mitigate CVE-2021-4034 on RHEL with Ansible Playbook

playbooks · 3

HUse Ansible to mitigate CVE-2021-4034 on RHEL systems. Automate the installation of SystemTap, debugging packages, and deploy mitigation scripts.

Beginner

Configuring Kernel Parameters in RedHat-like Linux Systems with Ansible System Role

playbooks · 4

Learn how to configure kernel parameters in RedHat-like Linux systems using the Ansible System Role. Follow our live Playbook example for efficient.

Beginner

Ansible modprobe — Load Kernel Modules

playbooks · 4

How to automate the Linux Kernel module loading of the "dummy" module with parameters on an example machine with Ansible.

Beginner

Ansible sysctl Module — Kernel Tuning

playbooks · 4

Set and persist Linux kernel parameters with ansible.posix.sysctl. Playbook examples for vm.swappiness, ip_forward, file-max, and more.

Beginner

Detect Apache Log4j CVE-2021-44228 with Ansible Playbook

playbooks · 4

Use Ansible to automate the detection of Apache Log4j CVE-2021-44228 vulnerability. Follow this guide to set up and run detection scripts efficiently.

Beginner

Ansible SELinux Permissive Mode

playbooks · 4

How to automate the enabling or disabling of SELinux Permissive policy per single process or domain keeping the whole system under enforcing policy.

Beginner

Ansible seboolean — SELinux Booleans

playbooks · 8

Enable and disable SELinux booleans with ansible.posix.seboolean. Persist settings across reboots, list booleans, and troubleshoot SELinux policies.

Beginner

Set the SELinux Policy States and Modes on Linux — Ansible module selinux

playbooks · 4

How to automate the setting and verification of the "enforcing" SELinux mode and state with "targeted" policy and relabel the filesystem if necessary.

Advanced

Ansible user — Change Password

playbooks · 6

Change a Linux user password with the Ansible user module and password_hash: SHA-512 hashes, idempotent salts, Vault-encrypted passwords, and bulk changes.

Beginner

Ansible firewalld — Open Ports RedHat

playbooks · 7

Open and manage firewall ports on RedHat, CentOS, Fedora with Ansible firewalld module. Complete guide with services, ports, rich rules, zones.

Advanced