This repository has been archived on 2023-09-13. You can view files and clone it, but cannot push or open issues or pull requests.
homeserver-ansible/run.yml

148 lines
3.0 KiB
YAML
Raw Normal View History

2022-02-27 16:05:34 -05:00
---
2022-03-01 17:43:44 -05:00
- hosts: sv
2022-02-27 16:05:34 -05:00
become: yes
2022-03-02 19:58:31 -05:00
gather_facts: no
2022-03-01 17:43:44 -05:00
2022-03-02 19:58:31 -05:00
pre_tasks:
- import_tasks: tasks/set_host.yml
2022-03-19 14:54:24 -04:00
tags:
- host
2022-03-02 19:58:31 -05:00
- import_tasks: tasks/ssh_port.yml
2022-03-19 14:54:24 -04:00
tags:
- port
2022-03-04 07:30:52 -05:00
- import_tasks: tasks/bootstrap.yml
2022-03-19 14:54:24 -04:00
tags:
- bootstrap
2022-03-01 17:43:44 -05:00
2022-03-02 19:58:31 -05:00
roles:
- role: system
2022-03-19 14:54:24 -04:00
tags:
- system
2022-03-02 19:58:31 -05:00
2022-04-27 17:32:11 -04:00
- role: aur
tags:
- aur
when: enable_aur
2022-03-01 17:43:44 -05:00
- role: filesystems
2022-03-19 14:54:24 -04:00
tags:
- filesystems
2022-03-01 17:43:44 -05:00
when: enable_filesystems
2022-05-14 21:37:06 -04:00
- role: backup
tags:
- backup
when: enable_backup
2022-03-01 17:43:44 -05:00
- role: networking/connection
2022-03-19 14:54:24 -04:00
tags:
- connection
2022-03-01 17:43:44 -05:00
when: enable_connection
2022-03-02 19:58:31 -05:00
- role: firewall
2022-03-19 14:54:24 -04:00
tags:
- firewall
2022-03-02 19:58:31 -05:00
when: enable_firewall
2022-03-01 17:43:44 -05:00
- role: networking/ddclient
2022-03-19 14:54:24 -04:00
tags:
- ddclient
2022-03-01 17:43:44 -05:00
when: enable_ddclient
- role: networking/nameserver
2022-03-19 14:54:24 -04:00
tags:
- nameserver
2022-03-01 17:43:44 -05:00
when: enable_nameserver
2022-03-02 19:58:31 -05:00
- role: services/mail
2022-03-19 14:54:24 -04:00
tags:
- mail
2022-03-02 19:58:31 -05:00
when: enable_mail
2022-12-25 21:00:16 -05:00
- role: services/syncthing
tags:
- syncthing
when: enable_syncthing
# Main SSL certificate (with Let's Encrypt)
2022-03-01 17:43:44 -05:00
- role: networking/ssl
2022-03-19 14:54:24 -04:00
tags:
- ssl
acme_dir: "https://acme-v02.api.letsencrypt.org/directory"
cert_name: "{{ domain }}"
ssl_domains:
- "{{ server_blocks.wiki.domain }}"
- "{{ server_blocks.synapse.domain }}"
- "{{ server_blocks.website.domain }}"
- "{{ server_blocks.gitea.domain }}"
- "{{ server_blocks.navidrome.domain }}"
account_name: "letsencrypt"
2022-03-01 17:43:44 -05:00
when: enable_ssl
# SSL cert for dyndns_domain
- role: networking/ssl
tags:
- ssl
acme_dir: "https://acme-v02.api.letsencrypt.org/directory"
ssl_domains:
- "{{ dyndns_domain }}"
account_name: "letsencrypt"
when: enable_ssl and dyndns_domain != domain
# ZeroSSL certificate for Coturn (see https://bugs.chromium.org/p/webrtc/issues/detail?id=11710)
- role: networking/ssl
tags:
- ssl
acme_dir: "https://acme.zerossl.com/v2/DV90"
ssl_domains:
- "{{ service_info.coturn.domain }}"
acme_eab: {
alg: HS256,
key: "{{ zerossl_acme_eab_key }}",
kid: "{{ zerossl_acme_eab_kid }}"
}
acme_email: "{{ zerossl_email }}"
account_name: "zerossl"
when: enable_ssl and enable_coturn
2022-03-02 19:58:31 -05:00
- role: services/webserver
2022-03-19 14:54:24 -04:00
tags:
- webserver
2022-03-02 19:58:31 -05:00
when: enable_webserver
2022-03-01 17:43:44 -05:00
- role: services/gitea
2022-03-19 14:54:24 -04:00
tags:
- gitea
2022-03-01 17:43:44 -05:00
when: enable_gitea
- role: services/wiki
2022-03-19 14:54:24 -04:00
tags:
- wiki
2022-03-01 17:43:44 -05:00
when: enable_wiki
2022-04-27 17:32:11 -04:00
- role: services/navidrome
tags:
- navidrome
when: enable_navidrome
2022-05-22 20:47:58 -04:00
- role: services/coturn
tags:
- coturn
when: enable_coturn
2022-03-01 17:43:44 -05:00
- role: services/synapse
2022-03-19 14:54:24 -04:00
tags:
- synapse
2022-03-01 17:43:44 -05:00
when: enable_synapse
- role: services/website
2022-03-19 14:54:24 -04:00
tags:
- website
2022-03-01 17:43:44 -05:00
when: enable_website
2022-03-02 19:58:31 -05:00
- role: dotfiles
2022-03-19 14:54:24 -04:00
tags:
- dotfiles
2022-03-02 19:58:31 -05:00
when: enable_dotfiles