infrastructure/tin.yml
2021-12-09 19:11:50 +01:00

68 lines
1.4 KiB
YAML

---
- hosts: tin.invidious.io
handlers:
- name: restart ssh
systemd:
name: sshd
state: restarted
tasks:
- name: SSH config
template:
src: sshd_config.j2
dest: /etc/ssh/sshd_config
mode: 0644
notify: restart ssh
tags: [ssh, base]
- name: SSH keys
template:
src: authorized_keys.j2
dest: /root/.ssh/authorized_keys
mode: 0600
tags: [ssh, base]
- name: Install packages
apt:
name: "{{ apt_packages }}"
update_cache: true
tags: [apt, base]
- name: unattended-upgrades
import_role:
name: jnv.unattended-upgrades
tags: [unattended-upgrades]
- name: pip
import_role:
name: geerlingguy.pip
tags: [pip,docker]
- name: docker
import_role:
name: geerlingguy.docker
tags: [dockerd, docker]
- name: Deploy invidious api
import_tasks: tasks/compose.yml
vars:
app: instances-api
tags: [instances-api, api, docker]
- name: Deploy invidious redirect
import_tasks: tasks/compose.yml
vars:
app: redirect
tags: [redirect, docker]
- name: Deploy invidious website
import_tasks: tasks/compose.yml
vars:
app: invidious.io
tags: [website, docker]
- name: caddy
import_role:
name: caddy_ansible.caddy_ansible
tags: [caddy]