Some Ansible roles to simplify and track modifications on the VPS
Go to file
Darks 065b5d42a8
Added iptables role
2020-09-10 19:32:37 +02:00
roles Added iptables role 2020-09-10 19:32:37 +02:00
.gitignore Added nginx & uwsgi roles 2020-09-10 18:38:19 +02:00
README.md Added a readme 2020-09-10 18:58:06 +02:00
inventory.yml Added nginx & uwsgi roles 2020-09-10 18:38:19 +02:00
iptables.yml Added iptables role 2020-09-10 19:32:37 +02:00
nginx.yml Added nginx & uwsgi roles 2020-09-10 18:38:19 +02:00
ssh.yml Added iptables role 2020-09-10 19:32:37 +02:00
uwsgi.yml Added nginx & uwsgi roles 2020-09-10 18:38:19 +02:00

README.md

Configuration

  1. Install Ansible on your machine (pacman -S ansible).
  2. You should have an account with sudoers rights on the target.
  3. Add an host to your ~/.ssh/config to simplify the login process:
Host aperture-labs
	HostName v5.planet-casio.com
	User <username>

Use a role

Usually, it looks like this:

# Dummy try with --check
ansible-playbook -i inventory.yml role.yml -v --diff --check --ask-become-pass
# Real try
ansible-playbook -i inventory.yml role.yml -v --ask-become-pass

The file inventory.yml already contains an host: the main VPS, aperture-labs. See Configuration to add the host to your SSH config.

Existing roles

Nginx

Update the nginx configuration, reload the service

Variable name Mandatory Comment
sites_enabled yes List of sites to enable from sites-available

Uwsgi

Update the uwsgi configuration, restart the service

Variable name Mandatory Comment
environments yes List of environments to restart