ansible/pizza1/playbook.yaml
2024-01-12 17:42:59 +05:30

57 lines
1.4 KiB
YAML

---
- name: Pizza-1 specific stuff
hosts: eu
tasks:
- name: Install stuff
ansible.builtin.apt:
name:
- postfix
- postfix-pgsql
- tor
- knot
- knot-dnsutils
- knot-module-geoip
- haproxy
- wireguard
- name: Setup postfix configs
ansible.builtin.copy:
src: ./configs/postfix
dest: /etc
mode: preserve
- name: Restart postfix
ansible.builtin.service:
name: postfix
enabled: true
state: restarted
- name: Setup torrc
ansible.builtin.copy:
src: ./configs/tor/torrc
dest: /etc/tor/torrc
mode: preserve
# You gotta copy pjsfsvc manually though
- name: Restart tor
ansible.builtin.service:
name: tor
enabled: true
state: restarted
- name: Setup haproxy configs
ansible.builtin.copy:
src: ./configs/haproxy/haproxy.cfg
dest: /etc/haproxy/haproxy.cfg
mode: preserve
- name: Restart+Enable haproxy
ansible.builtin.service:
name: haproxy
enabled: true
state: restarted
- name: Setup wireguard configs
ansible.builtin.template:
src: ./configs/wireguard/wg0.conf
dest: /etc/wireguard/wg0.conf
mode: preserve
- name: Enable wireguard
ansible.builtin.service:
name: wg-quick@wg0
enabled: true
state: restarted