Compare commits
4 Commits
270f03a702
...
61a891ae24
Author | SHA1 | Date |
---|---|---|
Massaki Archambault | 61a891ae24 | |
Massaki Archambault | bc5f1ec01c | |
Massaki Archambault | 48ca9f85d9 | |
Massaki Archambault | 9781bb161d |
|
@ -47,6 +47,7 @@ haproxy:
|
||||||
- deluge.badjware.dev
|
- deluge.badjware.dev
|
||||||
- tavern.badjware.dev
|
- tavern.badjware.dev
|
||||||
- actual.badjware.dev
|
- actual.badjware.dev
|
||||||
|
- openai.badjware.dev
|
||||||
backend:
|
backend:
|
||||||
- server: 192.168.20.20:8443
|
- server: 192.168.20.20:8443
|
||||||
- server: 192.168.20.21:8443
|
- server: 192.168.20.21:8443
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
k3s:
|
k3s:
|
||||||
version: v1.28.8+k3s1
|
version: v1.31.4+k3s1
|
||||||
# disable local-path-provisioner, we use longhorn instead
|
# disable local-path-provisioner, we use longhorn instead
|
||||||
extra_server_args: --disable local-storage
|
extra_server_args: --disable local-storage
|
4
hosts
4
hosts
|
@ -36,8 +36,8 @@ all:
|
||||||
nut_client:
|
nut_client:
|
||||||
ups: liebert-psi
|
ups: liebert-psi
|
||||||
sched:
|
sched:
|
||||||
# We want to shutdown this server quick
|
# We want to shutdown this server quicker
|
||||||
on_bat: 15
|
on_bat: 60
|
||||||
bastion:
|
bastion:
|
||||||
hosts:
|
hosts:
|
||||||
bastion:
|
bastion:
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
- hosts: k3s-agent0,k3s-agent1,k3s-agent2,k3s-agent3
|
||||||
|
tasks:
|
||||||
|
- reboot:
|
|
@ -42,9 +42,3 @@
|
||||||
dest: /opt/certbot/certbot-deploy.sh
|
dest: /opt/certbot/certbot-deploy.sh
|
||||||
mode: '0700'
|
mode: '0700'
|
||||||
notify: Run certbot
|
notify: Run certbot
|
||||||
|
|
||||||
- name: Install weekly haproxy reload
|
|
||||||
cron:
|
|
||||||
name: "haproxy reload"
|
|
||||||
special_time: weekly
|
|
||||||
job: "/bin/systemctl reload haproxy"
|
|
|
@ -1,2 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cat /etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/fullchain.pem /etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/privkey.pem >/etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/{{ letsencrypt.domains[0] }}.pem
|
cat /etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/fullchain.pem /etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/privkey.pem >/etc/letsencrypt/live/{{ letsencrypt.domains[0] }}/{{ letsencrypt.domains[0] }}.pem
|
||||||
|
systemctl restart haproxy
|
|
@ -1,7 +1,7 @@
|
||||||
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
|
SUBSYSTEM!="usb", GOTO="nut-usbups_rules_end"
|
||||||
|
|
||||||
{% for name, config in nut_server.ups.items() %}
|
{% for name, config in nut_server.ups.items() %}
|
||||||
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="{{ config.vendorid }}", ATTR{idProduct}=="{{ config.productid }}", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop; /sbin/upsdrvctl start"
|
ACTION=="add|change", SUBSYSTEM=="usb|usb_device", SUBSYSTEMS=="usb|usb_device", ATTR{idVendor}=="{{ config.vendorid }}", ATTR{idProduct}=="{{ config.productid }}", MODE="664", GROUP="nut", RUN+="/sbin/upsdrvctl stop || /sbin/upsdrvctl start"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
LABEL="nut-usbups_rules_end"
|
LABEL="nut-usbups_rules_end"
|
|
@ -22,17 +22,19 @@
|
||||||
creates: /etc/wireguard/private.key
|
creates: /etc/wireguard/private.key
|
||||||
register: private_key_gen
|
register: private_key_gen
|
||||||
|
|
||||||
- name: Fetch private key
|
- name: Read private key
|
||||||
command: cat /etc/wireguard/private.key
|
command: cat /etc/wireguard/private.key
|
||||||
register: private_key
|
register: private_key
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Generate public key
|
- name: Generate public key
|
||||||
shell: cat /etc/wireguard/private.key | wg pubkey >/etc/wireguard/public.key
|
shell: cat /etc/wireguard/private.key | wg pubkey >/etc/wireguard/public.key
|
||||||
when: not public_key_stats.stat.exists or private_key_gen.changed
|
when: not public_key_stats.stat.exists or private_key_gen.changed
|
||||||
|
|
||||||
- name: Fetch public key
|
- name: Read public key
|
||||||
command: cat /etc/wireguard/public.key
|
command: cat /etc/wireguard/public.key
|
||||||
register: public_key
|
register: public_key
|
||||||
|
changed_when: false
|
||||||
|
|
||||||
- name: Print public key
|
- name: Print public key
|
||||||
debug:
|
debug:
|
||||||
|
|
Loading…
Reference in New Issue