awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
dev-sec avatar

dev-sec/ansible-collection-hardening

0
View on GitHub↗
5,225 stars·815 forks·Jinja·apache-2.0·22 viewsdev-sec.io↗

Ansible Collection Hardening

This is an Ansible collection that automates security hardening for Linux operating systems, databases, web servers, and SSH services. It provides a declarative, modular architecture that enforces idempotent security configurations, ensuring that each task only applies changes when the current system state deviates from the desired security baseline.

The collection organizes security configurations into reusable Ansible roles, each targeting a specific system component. It includes roles for hardening OpenSSH with key-only authentication and disabled root login, securing MySQL and MariaDB installations with strong authentication and local binding, and configuring Nginx and Apache web servers by disabling server tokens and restricting cipher suites. The roles are designed to work across multiple Linux families, using distribution-specific conditionals and package managers.

The collection maps hardening tasks to established security standards such as CIS benchmarks, grouping controls into role-specific conditional logic. It generates configuration files from Jinja2 templates with variables, enabling customization across different Linux distributions without duplicating code. The final hardened state of a system is defined in YAML inventory variables, allowing Ansible to converge any machine toward that state through continuous application.

Features

  • Ansible Collections - An Ansible collection that automates security baselines for Linux systems, network services, and databases to reduce attack surfaces and enforce compliance.
  • Linux Security Hardening - Apply security hardening configurations to operating systems to meet compliance baselines, including user account restrictions and permission settings.
  • Automated Hardening Playbooks - Playbooks that configure kernel parameters, user accounts, file permissions, and audit settings for Linux distributions.
  • Database Server Hardening - Enforce strong database authentication, remove default test databases, bind services to local sockets, and apply compliance baselines to secure database servers.
  • MySQL & MariaDB Hardening - Ansible tasks that remove anonymous accounts, set root passwords, bind to localhost, and delete default test databases.
  • SSH Service Hardening - Disable remote root login, enforce key-based authentication, restrict encryption ciphers, and apply security baselines to secure shell daemon configuration.
  • Web Server Hardening - Hardening web servers like Nginx by disabling server tokens, restricting cipher suites, and limiting attack surface.
  • SSH Hardening Playbooks - Ansible roles that enforce key-based authentication, disable root login, and restrict cipher suites on SSH servers.
  • SSH Security Configurations - Configuring OpenSSH with key-only authentication, disabled root login, and strong ciphers to secure remote access.
  • System State Idempotency - Ensures each Ansible task only applies changes when the current system state deviates from the desired security baseline, preventing repeated modifications.
  • Infrastructure State Enforcers - Defines the final hardened state of a system in YAML inventory variables, allowing Ansible to converge any machine toward that state through continuous application.
  • Cross-Distribution Role Support - Tests and validates role execution across multiple Linux families (Debian, Red Hat, etc.) using distribution-specific conditionals and package managers.
  • Role-Based Configuration Modularization - Organises security configurations into reusable Ansible roles, each targeting a specific system component like SSH, nginx, or MySQL.
  • Compliance Baseline Mappings - Aligns hardening tasks with established security standards such as CIS benchmarks by grouping controls into role-specific conditional logic.
  • Nginx Security Hardening - Automated configuration to disable server tokens, limit SSL protocols, and set secure headers for Nginx deployments.

Star history

Star history chart for dev-sec/ansible-collection-hardeningStar history chart for dev-sec/ansible-collection-hardening

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Projects sharing features with Ansible Collection Hardening

These projects share indexed features with Ansible Collection Hardening. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • dev-sec/ansible-os-hardeningdev-sec avatar

    dev-sec/ansible-os-hardening

    5,391View on GitHub↗

    This project is a collection of automated hardening frameworks and Ansible roles designed to secure Linux systems, databases, SSH services, and web servers. It functions as a configuration framework that reduces the attack surface of Linux distributions through the automated enforcement of security policies. The collection provides specific security baselines for a variety of services, including MySQL databases, OpenSSH daemons, and web servers such as Nginx and Apache. These roles are designed to remove insecure defaults, enforce secure authentication methods, and align system configurations

    Jinja
    View on GitHub↗5,391
  • geerlingguy/ansible-for-devopsgeerlingguy avatar

    geerlingguy/ansible-for-devops

    9,792View on GitHub↗

    This project is an infrastructure as code framework and library of reusable playbooks designed for server configuration and DevOps workflow automation. It provides a Linux server configuration suite and specialized tools for provisioning multi-node Kubernetes clusters to support containerized applications. The library enables the automation of infrastructure tasks and the orchestration of multi-server workflows. It includes specific logic for deploying containerized workloads and managing application environments across different hosting platforms. The codebase covers broad capability areas

    Pythonamazonansibleaws
    View on GitHub↗9,792
  • rocky-linux/rockyrocky-linux avatar

    rocky-linux/rocky

    9,497View on GitHub↗

    Rocky is an open-source enterprise operating system designed for server and cloud infrastructure. It is a community-maintained Linux server distribution that provides a platform focused on stability and security. The project is fundamentally a Red Hat Enterprise Linux compatible operating system, maintaining bug-for-bug binary compatibility to ensure identical software behavior. This allows it to serve as an enterprise-grade platform without proprietary licensing. The distribution covers a broad range of system administration capabilities, including package management via modular repository

    enterprise-linuxrocky
    View on GitHub↗9,497
  • bregman-arie/devops-exercisesbregman-arie avatar

    bregman-arie/devops-exercises

    82,879View on GitHub↗

    This project is a comprehensive educational curriculum designed to build proficiency across modern infrastructure, cloud-native technologies, and systems administration. It functions as a reference library and interview preparation resource, offering a structured collection of conceptual questions, practical coding challenges, and hands-on scenarios that cover the full spectrum of software delivery and operational workflows. The repository distinguishes itself through a modular, domain-specific structure that links instructional problem statements with verified implementation examples. By emp

    Pythonansibleawsazure
    View on GitHub↗82,879
Compare all 30 related projects→

Frequently asked questions

What does dev-sec/ansible-collection-hardening do?

This is an Ansible collection that automates security hardening for Linux operating systems, databases, web servers, and SSH services. It provides a declarative, modular architecture that enforces idempotent security configurations, ensuring that each task only applies changes when the current system state deviates from the desired security baseline.

What are the main features of dev-sec/ansible-collection-hardening?

The main features of dev-sec/ansible-collection-hardening are: Ansible Collections, Linux Security Hardening, Automated Hardening Playbooks, Database Server Hardening, MySQL & MariaDB Hardening, SSH Service Hardening, Web Server Hardening, SSH Hardening Playbooks.

Which projects share features with dev-sec/ansible-collection-hardening?

Projects with overlapping indexed features include: dev-sec/ansible-os-hardening — This project is a collection of automated hardening frameworks and Ansible roles designed to secure Linux systems,… geerlingguy/ansible-for-devops — This project is an infrastructure as code framework and library of reusable playbooks designed for server… rocky-linux/rocky — Rocky is an open-source enterprise operating system designed for server and cloud infrastructure. It is a… bregman-arie/devops-exercises — This project is a comprehensive educational curriculum designed to build proficiency across modern infrastructure,… ansible/ansible-examples — This repository serves as a library of reference patterns and scripts for infrastructure automation and configuration… imthenachoman/how-to-secure-a-linux-server — This project is a Linux server security guide and system administration manual designed to harden the operating system…