2024-01-12 16:08:08 +05:30
|
|
|
---
|
|
|
|
- name: Pizza-1 specific stuff
|
2024-01-12 16:22:46 +05:30
|
|
|
hosts: eu
|
2024-01-12 16:08:08 +05:30
|
|
|
tasks:
|
|
|
|
- name: Install stuff
|
|
|
|
ansible.builtin.apt:
|
|
|
|
name:
|
|
|
|
- postfix
|
|
|
|
- postfix-pgsql
|
|
|
|
- tor
|
|
|
|
- knot
|
|
|
|
- knot-dnsutils
|
|
|
|
- knot-module-geoip
|
2024-01-12 16:12:17 +05:30
|
|
|
- haproxy
|
2024-01-12 17:37:22 +05:30
|
|
|
- wireguard
|
2024-01-12 16:08:08 +05:30
|
|
|
- name: Setup postfix configs
|
|
|
|
ansible.builtin.copy:
|
2024-01-12 16:52:51 +05:30
|
|
|
src: ./configs/postfix
|
2024-01-12 16:57:10 +05:30
|
|
|
dest: /etc
|
2024-01-12 16:08:08 +05:30
|
|
|
mode: preserve
|
|
|
|
- name: Restart postfix
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: postfix
|
|
|
|
enabled: true
|
|
|
|
state: restarted
|
|
|
|
- name: Setup torrc
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: ./configs/tor/torrc
|
2024-01-12 16:25:25 +05:30
|
|
|
dest: /etc/tor/torrc
|
2024-01-12 16:08:08 +05:30
|
|
|
mode: preserve
|
|
|
|
# You gotta copy pjsfsvc manually though
|
|
|
|
- name: Restart tor
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: tor
|
|
|
|
enabled: true
|
|
|
|
state: restarted
|
2024-01-12 16:12:17 +05:30
|
|
|
- name: Setup haproxy configs
|
|
|
|
ansible.builtin.copy:
|
|
|
|
src: ./configs/haproxy/haproxy.cfg
|
2024-01-12 16:25:25 +05:30
|
|
|
dest: /etc/haproxy/haproxy.cfg
|
2024-01-12 16:12:17 +05:30
|
|
|
mode: preserve
|
|
|
|
- name: Restart+Enable haproxy
|
|
|
|
ansible.builtin.service:
|
|
|
|
name: haproxy
|
|
|
|
enabled: true
|
|
|
|
state: restarted
|
2024-01-12 17:37:22 +05:30
|
|
|
- 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
|
2024-01-12 17:42:59 +05:30
|
|
|
state: restarted
|