infrastructure/tin.yml

62 lines
1.3 KiB
YAML
Raw Normal View History

2021-10-26 20:17:13 +00:00
---
- 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 api
import_tasks: tasks/compose.yml
vars:
app: redirect
tags: [redirect, docker]
- name: caddy
import_role:
name: caddy_ansible.caddy_ansible
tags: [caddy]