Giter Site home page Giter Site logo

ansible-security-roles's Introduction

Ansible Security Roles

This repository contains a collection of Ansible roles that can be used to perform security-related tasks on servers. These roles can help you automate the process of securing your servers and ensure that your infrastructure is always compliant with industry-standard security benchmarks.


Requirements

  • Ansible 2.9 or higher
  • Python 3

Getting started

To use these roles in your Ansible project, you can simply clone this repository into your project's roles directory:

git clone https://github.com/your_username/ansible-security-roles.git roles/security

(Recommended): If you are creating a fresh Ansible playbook for yourself, I suggest to use python venv. Go to your Ansible playbook root directory and then:

python -m venv venv
source venv/bin/activate
pip install ansible

Roles

The following roles are currently available in this repository:

  • cis: This role implements the CIS benchmark security checks for Ubuntu operating systems.

You can add more roles to this section as you develop them.


Usage

  1. Create inventories/hosts.ini file containing your host groups. exp:
# This is the host group name that you can call in your playbooks.
[dev]

# The target IP address and some ansible connection configuration for each host.
1.1.1.1 ansible_user=ubuntu
1.1.1.2 
  1. To use a role in your playbook, you can simply include it as follows in your Ansible project root directory:
# playbook.yml
- name: Security Benchmarks
  # group name in your inventory file or use `all` for all hosts
  hosts: dev
  
  roles:
    - name: cis
      become: yes
      gather_facts: true
      # Ignores errors and continues executing the playbook for all tasks
      ignore_errors: true
  1. Run your playbook:
ansible-playbook -i inventories/hosts.ini playbook.yml

Contributing

Contributions are welcome! If you have an idea for a new role or want to improve an existing one, feel free to submit a pull request.


License

This project is licensed under the MIT License.

Of course, feel free to modify this to suit your needs and add more information as necessary.

ansible-security-roles's People

Contributors

jnaghiloo avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.