update scripts

master
Paul Walko 2021-07-18 14:57:47 -04:00
parent 6951498b63
commit 0f778e4cf1
3 changed files with 32 additions and 22 deletions

View File

@ -11,11 +11,10 @@ ExecStart=/usr/bin/ssh -Nn \
-o ServerAliveCountMax=3 \
-o ExitOnForwardFailure=yes \
-i /home/paul/.ssh/id_rsa_fast \
-R 7000:127.0.0.1:8080 \
-R 7001:127.0.0.1:8443 \
-R 7000:127.0.0.1:80 \
-R 7001:127.0.0.1:443 \
-R 7002:127.0.0.1:2222 \
-R 7003:127.0.0.1:25565 \
-R 7004:127.0.0.1:8448 \
pew@polyvalent.seaturtle.pw
Restart=always
RestartSec=30

View File

@ -11,4 +11,4 @@ cabinet hostname=cabinet.seaturtle.pw interface=enp9s0 admin=paul
joe@madone.seaturtle.pw hostname=madone.seaturtle.pw interface=enp1s0 admin=joe
[cloudlab]
polyvalent hostname=polyvalent.seaturtle.pw interface=eth0 admin=joe
joe@polyvalent hostname=polyvalent.seaturtle.pw interface=eth0 admin=joe

View File

@ -117,7 +117,7 @@
owner: root
group: mail
mode: '0640'
when: dma_auth is defined
when: dma_auth is defined and dma_auth != ''
## Changes will take effect during next reboot, does not effect static IPs
- name: Configure sysctl with IPv6 privacy extensions
@ -162,7 +162,7 @@
owner: root
group: root
mode: '0755'
when: gandi_api_key is defined
when: gandi_api_key is defined and gandi_api_key != ''
- name: Add Dynamic DNS cronjob
cron:
@ -202,6 +202,8 @@
# Proxy config
- hosts: cloudlab
become: yes
handlers:
- import_tasks: handlers.yml
tasks:
## Changes will take effect during next reboot
- name: Configure sysctl to reject RA acceptance
@ -229,23 +231,33 @@
- name: Install HAProxy proxy config
copy:
src: files/{{ inventory_hostname }}/haproxy.cfg
src: "files/{{ inventory_hostname.split('@')[1] }}/haproxy.cfg"
dest: /etc/haproxy/haproxy.cfg
owner: root
group: root
mode: '0644'
notify: Restart haproxy
- name: Sync data cronjob - Friday
cron:
name: 'Sync data'
minute: '0'
hour: '0'
day: '*'
month: '*'
weekday: '5'
user: pew
job: "/home/pew/scripts-private/{{ inventory_hostname.split('@')[1] }}/sync.sh"
# Compute config
- hosts: homelab
become: yes
handlers:
- import_tasks: handlers.yml
tasks:
- name: Install dnsmasq, sambda, zfs stuff
- name: Install samba, zfs stuff
apt:
name:
- dnsmasq
- samba
- zfs-auto-snapshot
- zfs-zed
@ -279,7 +291,7 @@
# /home/paul/.ssh/id_rsa_fast must exist
- name: Install sshtunnel systemd service
copy:
src: files/fogcutter/sshtunnel.service
src: "files/{{ inventory_hostname }}/sshtunnel.service"
dest: /etc/systemd/system/sshtunnel.service
owner: root
group: root
@ -294,6 +306,17 @@
- debug:
msg: Manually configure rclone remote drive
- name: Backup data cronjob - Monday
cron:
name: 'Backup data'
minute: '0'
hour: '0'
day: '*'
month: '*'
weekday: '1'
user: paul
job: "/home/paul/scripts-private/{{ inventory_hostname }}/backup.sh"
- name: Configure samba
copy:
src: files/smb.conf
@ -306,18 +329,6 @@
- debug:
msg: Manually set samba password
- name: Install dnsmasq config
template:
src: templates/dnsmasq.conf.j2
dest: /etc/dnsmasq.conf
owner: root
group: root
mode: '0644'
notify: Restart dnsmasq
- debug:
msg: Manually set hosts in /etc/hosts
# IRC config
- hosts: irc
become: yes