ansible-hardening
Skill1 starsChanged 34 days agoMITView on GitHub
Build and review idempotent Ansible hardening roles for hosts, audit logging, firewalls, service isolation and scoped privilege.
In this repository43 other files it gives its agents.
- cavetechSkill
- ci-cdSkill
- claude-to-cursorSkill
- code-consistencySkill
- code-qualitySkill
- config-auditorSkill
- container-sandboxSkill
- cpa-tax-specialistSkill
- database-designSkill
- definition-of-doneSkill
- differential-reviewSkill
- exact-head-reviewSkill
- fast-ciSkill
- grill-meSkill
- inbound-syncSkill
- infosec-architectSkill
- insecure-defaultsSkill
- lonely-sysadminSkill
- mcp-createSkill
- mcp-hardeningSkill
- model-evaluationSkill
- modern-pythonSkill
- ms-office-suiteSkill
- mutation-checkSkill
- plan-to-execution-handoffSkill
- prd-to-planSkill
- property-based-testingSkill
- pr-truth-triageSkill
- repo-hardening-workflowSkill
- resume-writerSkill
- skill-updaterSkill
- software-developerSkill
- software-development-lifecycleSkill
- solutions-architectSkill
- stay-readySkill
- supply-chain-risk-auditorSkill
- systematic-debuggingSkill
- tax-reference-currencySkill
- tddSkill
- token-miserSkill
- triage-issueSkill
- verification-before-completionSkill
- write-a-prdSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Read the existing inventory, roles, supported OS versions and access policy.
- Very specific: line 9
Use the existing role layout: defaults/, tasks/, handlers/, templates/, meta/.
- Distinctive: line 10
Default privileges and network access to the minimum required.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Ansible hardening
- Read the existing inventory, roles, supported OS versions and access policy. Identify the target host and authorized change scope before applying anything.
- Establish current access, service health, configuration backups and a tested recovery route. Preserve a working administrative session during SSH/firewall changes.
- Use the existing role layout:
defaults/,tasks/,handlers/,templates/,meta/. Prefer fully qualified modules and explicit file ownership/modes. - Default privileges and network access to the minimum required. Never blanket-allow a subnet merely because it is local. Document each firewall source, destination, port and purpose.
- Store secrets in the approved encrypted secret mechanism. Protect task output with
no_logwhere necessary; do not expose secrets through check-mode diffs. - Preview with syntax validation, lint and
--check --diffon a disposable representative target. Some modules cannot simulate changes; label that limitation. - Apply to an authorized canary, verify real consumer behavior and access, then expand under the rollout policy. Second apply must converge without unnecessary restarts.
Controls to consider
- SSH: explicit administrative principals, key authentication, tested recovery.
- Firewall and intrusion prevention: limited rules, reviewed exclusions, log/alert delivery. Verify the combined firewall outcome when multiple tools manage it.
- Audit: monitor privilege, service and authentication configuration; bound retention and protect log access.
- Service isolation: dedicated identity, restricted filesystem/network/device access, least capabilities, necessary writable paths only.
- Sudo: prefer no passwordless privilege. If required, allow an exact reviewed command and arguments. Do not grant unrestricted shells, package managers, editors or generic
systemctlaccess; these can become root execution. - Patching: verify supported versions from vendor sources; pin inputs according to the project's update policy.
Validate sudoers with visudo -cf before activation and SSH configuration with the target's supported validation command. A clean syntax check does not prove access or policy enforcement. Record revision, target, first/second-apply results, smoke evidence and recovery status.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

