2022-06-05 10:20:34 +00:00
|
|
|
---
|
|
|
|
- hosts: dia.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: Deploy gitea
|
|
|
|
import_tasks: tasks/compose.yml
|
|
|
|
vars:
|
|
|
|
app: gitea
|
|
|
|
tags: [gitea, docker]
|
|
|
|
|
|
|
|
- name: Deploy docs
|
|
|
|
import_tasks: tasks/compose.yml
|
|
|
|
vars:
|
|
|
|
app: "docs.invidious.io"
|
|
|
|
tags: [docs, docker]
|
|
|
|
|
2023-07-09 13:01:51 +00:00
|
|
|
- name: Deploy watchtower
|
|
|
|
import_tasks: tasks/compose.yml
|
|
|
|
vars:
|
|
|
|
app: "watchtower"
|
|
|
|
tags: [watchtower, docker]
|
|
|
|
|
2022-06-05 10:20:34 +00:00
|
|
|
- name: caddy
|
|
|
|
import_role:
|
|
|
|
name: caddy_ansible.caddy_ansible
|
|
|
|
tags: [caddy]
|