ansible_linux_security

Ansible Linux Hardening Project

Ansible Linux Security | Ubuntu

Status CI CD GitHub Issues GitHub Pull Requests License


An Ansible project to help in securing linux target servers (specifically Ubuntu)

🧐 About

This Ansible project performs a number of linux hardening tasks on a target or group of targets. This is based off of my own preferences and I am in no way a security expert by any means. Use at your own risk

⟆ Limitations

  • Officially only supports Ubuntu, but may work on other distrobutions as well. It has simply not been tested elsewhere yet.
  • Requires some additional collections to function properly (ansible.posix and community.general)

👷‍♂️ Getting Started

First clone the repository to your Ansible controller


git https://github.com/SystemFiles/ansible-linux-security.git; cd ansible-linux-security

Then, create a copy of the configuration and inventory files from the examples(defaults) provided


cp ./example.config.yml ./config.yml
cp ./example.inventory.yml ./inventory.yml

Note: for running after the first time, you will likely need to specify a port in your inventory.yml file to connect again.

Install prerequisite collections via requirements.yml

ansible-galaxy install -r requirements.yml

Install the role (can use local via roles: - '.')


ansible-galaxy install systemfiles.ansible_linux_security

Now execute the play against your identified hosts


ansible-playbook main.yml

👷‍♂️ Authors

About

Implements a number of best practices security measures to harden a linux system

Install
ansible-galaxy install SystemFiles/ansible-linux-security
GitHub repository
License
apache-2.0
Downloads
30