This repository contains Ansible role to setup and configure a teloshost
.
A teloshost
is an Ubuntu server that we provision in an opinionated way. The
objective is to streamline management of servers provisioned regardless of their
ultimate purpose.
This ansible role ensures that:
- Base system is configured.
- System packages are installed.
- Requested service installations and configurations are performed.
- Monitoring is setup.
Teloshost requires the following roles to be installed (if enabled):
ansible-galaxy install caddy_ansible.caddy_ansible
ansible-galaxy install dj-wasabi.telegraf
ansible-galaxy install geerlingguy.docker
Variables can be set in one of these locations (from least to highest presendence) among many others:
- inventory configuration (for all hosts):
all.vars.teloshost__{*}
- inventory configuration (for specific hosts):
all.hosts.<hostname>.teloshost__{*}
- variables file:
teloshost__{*}
To avoid inventory host specific timezone to be overridden by variables file, it is not advised to set this variable in anywhere else then the inventory configuration.
For further information about the variable presendence, see:
Group | Variables | Provision | Type | Default | Notes |
---|---|---|---|---|---|
global | inventory_hostname |
static | string | provided by Ansible | |
global | ansible_user_id |
static | string | provided by Ansible | Username used to establish the SSH connection with |
global | teloshost__logfile |
static | path | provided by playbook | Set to /var/log/teloshost.yaml |
global | teloshost__username |
static | string | provided by playbook | Set to patron |
base | teloshost__base__timezone |
variable | string | UTC |
|
base | teloshost__base__ssh__authorized_keys__common |
variable | list of strings | [] |
A list of GitHub logins |
base | teloshost__base__ssh__authorized_keys__extras |
variable | list of strings | [] |
A list of GitHub logins |
base | teloshost__base__packages__common |
static | list of strings | provided by Ansible | Default system packages to be installed. |
base | teloshost__base__packages__extras |
variable | list of strings | [] |
List of extra system packages to be installed. |
caddy | teloshost__caddy__enable |
variable | boolean | false |
Indication to enable Caddy service or not |
docker | teloshost__docker__enable |
variable | boolean | false |
Indication to enable Docker service or not |
docker | teloshost__docker__ctop_version |
variable | string | 0.7.7 |
Version of ctop to be installed |
monitoring | teloshost__monitoring__enable |
variable | boolean | true |
|
monitoring | teloshost__monitoring__telegraf__url |
variable | string | ||
monitoring | teloshost__monitoring__telegraf__token |
variable | string | ||
monitoring | teloshost__monitoring__telegraf__bucket |
variable | string | ||
monitoring | teloshost__monitoring__telegraf__organization |
variable | string |
None
- name: Setup a teloshost
hosts: all
become: true
roles:
- name: teloshost
MIT