# dev-sec/ansible-collection-hardening

This Ansible collection provides battle tested hardening for Linux, SSH, nginx, MySQL

Repository: https://github.com/dev-sec/ansible-collection-hardening
Canonical: https://ross.abutalabs.com/products/ansible-collection-hardening
Homepage: http://dev-sec.io/
Language: Jinja
License: Apache-2.0
License Family: permissive
Topics: ansible, sysctl, protection, hardening, role, playbook, linux, os-hardening, collection, mysql-hardening, ssh-hardening, devsec, nginx, nginx-hardening, ansible-collection, hacktoberfest
Last push: 2026-08-20T18:07:40+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 74, longevity 100
- inputs: {"age_days": 4139, "days_push": 13, "days_rel": 99, "gap_med": 63.5, "n_releases_24m": 9}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5450, forks 830 (observed 2026-08-28T04:09:18.644156+00:00)

## What it is
An Ansible collection of battle-tested hardening roles for Linux operating systems, SSH, nginx, and MySQL/MariaDB. It automates secure configuration and attack-surface reduction, aligned with the DevSec InSpec compliance baselines.

## Use cases
- harden linux servers with ansible
- secure sshd configuration automatically
- apply cis-style hardening to ubuntu and debian servers
- harden nginx and mysql configurations
- automate server security compliance
- reduce attack surface of cloud vms
- enforce secure sysctl kernel settings

## When to choose
- you use Ansible to provision or manage Linux servers and want automated, tested hardening
- you need compliance with DevSec/InSpec baselines or similar security standards
- you want maintained, community-validated secure defaults for SSH, nginx, MySQL, and the OS

## When to avoid
- your infrastructure is not managed with Ansible (consider the Chef or Puppet variants of dev-sec instead)
- you need hardening for Windows servers or other services like Apache or PostgreSQL
- you require fully hands-off compliance certification rather than configuration automation

## Facets
- artifact type: plugin
- maturity: active
- function: security, configuration-management, developer-tools
- domain: security, self-hosted, infrastructure-as-code
- platform: self-hosted, cloud
- tags: ansible, ansible-collection, hardening, ssh-hardening, os-hardening, nginx-hardening, mysql-hardening, sysctl, devsec, compliance, cis-benchmark, devops, linux

## Member repositories
- dev-sec/ansible-collection-hardening (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:18.644156+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:49.953656+00:00, confidence not recorded.
  - readme: https://github.com/dev-sec/ansible-collection-hardening (fetched 2026-08-28T04:09:18.644156+00:00, sha e95d6fc7eb45)
  - homepage: http://dev-sec.io/ (fetched 2026-08-29T08:51:54.640251+00:00, sha e63a01f7b0e8)
  - site_page: https://dev-sec.io/project (fetched 2026-08-29T08:51:54.672095+00:00, sha 39f4aa94e79f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
