antoniosmgatto / ansible-playbooks

Ansible playbooks to setup remote linux servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible playbooks

Ansible playbooks to setup Debian 10 (Buster) servers.

This repo has the following playbooks:

  • common.yml

    Generic setup with security concerns (install basic packages and setup apt, dns, firewall, ssh, sudo, swap, timezone )

  • rails.yml

    Rails setup (Nginx with ssl suport, puma, database libs (postgresql or mysql) and deploy via Capistrano)

Requirements

  • Python: 3.9
  • Ansible: 2.10
  • Virtualbox

Getting started

# install python packages
pip install -r ./requirements.txt

# download roles from Galaxy
./galaxy-update.sh

# create and setup your inventory
cp inventory.example production

# run playbook
 ansible-playbook -i production plays/common.yml

Tests

This project is configure with Vagrant for tests.

  # to startup the server
  vagrant up

  # use '-i test' to set the inventory to use vagrant environment
  ansible-playbook -i test plays/common.yml

Some useful commands:

  # to connect by ssh with vm
  vagrant ssh

  # to destroy the vm
  vagrant destroy

Licence

MIT

About

Ansible playbooks to setup remote linux servers


Languages

Language:Jinja 80.9%Language:Shell 19.1%