Ansible/README.md

1.3 KiB

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