add hatecomputers role!
This commit is contained in:
parent
4e93a081f8
commit
b81bfc5a29
4
deploy-hatecomputers.yml
Normal file
4
deploy-hatecomputers.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
- name: hatecomputers setup
|
||||||
|
hosts: hatecomputers
|
||||||
|
roles:
|
||||||
|
- hatecomputers
|
@ -64,3 +64,6 @@ europa ansible_user=root ansible_connection=ssh
|
|||||||
|
|
||||||
[drone]
|
[drone]
|
||||||
europa ansible_user=root ansible_connection=ssh
|
europa ansible_user=root ansible_connection=ssh
|
||||||
|
|
||||||
|
[hatecomputers]
|
||||||
|
levi ansible_user=root ansible_connection=ssh
|
||||||
|
1
roles/hatecomputers/files/.gitignore
vendored
Normal file
1
roles/hatecomputers/files/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
wireguard.cfg
|
33
roles/hatecomputers/tasks/main.yml
Normal file
33
roles/hatecomputers/tasks/main.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
- name: install wireguard
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- wireguard
|
||||||
|
state: latest
|
||||||
|
|
||||||
|
- name: copy config
|
||||||
|
ansible.builtin.copy:
|
||||||
|
src: ../files/wireguard.cfg
|
||||||
|
dest: /etc/wireguard/hatecomputers.conf
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0600
|
||||||
|
|
||||||
|
- name: enable and persist ip forwarding
|
||||||
|
sysctl:
|
||||||
|
name: net.ipv4.ip_forward
|
||||||
|
value: "1"
|
||||||
|
state: present
|
||||||
|
sysctl_set: yes
|
||||||
|
reload: yes
|
||||||
|
|
||||||
|
- name: start wireguard and enable on boot
|
||||||
|
systemd:
|
||||||
|
name: wg-quick@hatecomputers
|
||||||
|
enabled: yes
|
||||||
|
state: started
|
||||||
|
|
||||||
|
- name: allow wireguard endpoint ufw
|
||||||
|
ufw:
|
||||||
|
rule: allow
|
||||||
|
port: '51820'
|
||||||
|
proto: 'udp'
|
Loading…
Reference in New Issue
Block a user