/roles

General-purpose reusable Ansible roles

MIT LicenseMIT

Ansible Roles

General-purpose reusable Ansible roles.

Getting started

Install Ansible, preferably in a Python virtual environment:

$ pip install ansible

Clone this repo:

$ cd /path/to/extra/roles
$ git clone git@github.com:mrgnr/roles.git mrgnr_roles

Add it to your ansible.cfg:

[defaults]
roles_path = /path/to/extra/roles/mrgnr_roles

Include roles in your playbooks, e.g.:

---

- name: my_app
  hosts: app_servers
  become_method: sudo
  become: yes
  gather_facts: True
  roles:
    - packages
    - users
    - ssh
    - fail2ban
    - unattended-upgrades
    - tor
    - ufw
    - nginx
    - letsencrypt
    - my-app