Some Ansible roles to simplify and track modifications on the VPS
Go to file
Darks 5a211c975a
Refactoring
- moved inventory
- add some variables
- splitted files and templates
- added role grafana
- add a play 'all'
2020-09-10 21:56:13 +02:00
inventory Refactoring 2020-09-10 21:56:13 +02:00
roles Refactoring 2020-09-10 21:56:13 +02:00
.gitignore Added nginx & uwsgi roles 2020-09-10 18:38:19 +02:00
README.md Refactoring 2020-09-10 21:56:13 +02:00
all.yml Refactoring 2020-09-10 21:56:13 +02:00
iptables.yml Added iptables role 2020-09-10 19:32:37 +02:00
monitoring.yml Refactoring 2020-09-10 21:56:13 +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/main.yml role.yml -vv --diff --check --ask-become-pass
# Real try
ansible-playbook -i inventory/main.yml role.yml -v --ask-become-pass

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

Variables

Variables are defined in inventory/host_vars/aperture-labs.yml. They can be overriden, see the documentation.

They may be mandatory for execution of roles.

Variable name Comment
sites_enabled List of sites to enable from sites-available
proxy_ports List of ports to use with proxy_pass
allowed_users List of users allowed to login through SSH