Remove old homelab configs

This commit is contained in:
Salt 2023-10-29 14:07:46 -05:00
parent 4771981fc8
commit caa5210559
9 changed files with 0 additions and 483 deletions

View File

@ -1,152 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
# Webservers
---
- hosts: pi-octoprint-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
tasks:
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/octoprint.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- hosts: vm-ddns-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
tasks:
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/ddclient.yml
- app/ddns-route53.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- hosts: vm-scan-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
pre_tasks:
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
tasks:
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/gvm.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- hosts: vm-syncthing-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
pre_tasks:
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
tasks:
- name: assure nfs mount directory
ansible.builtin.file: path=/data/syncthing/data state=directory mode=0755
tags: [ storage ]
- name: assure nfs mount
mount: path=/data/syncthing/data src=192.168.190.1:/nfs/syncthing fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
tags: [ storage ]
- name: include tasks for applications
include_tasks: tasks/{{ item }}
with_items:
- app/syncthing.yml
tags: [ always ]
- name: assure movement cronjobs
ansible.builtin.cron:
name: "{{ item.name }}"
minute: 0
hour: 5
job: "rsync -avHS --remove-source-files '/data/syncthing/data/{{ item.src }}/' '/data/syncthing/data/{{ item.dest }}/' && rmdir '/data/syncthing/data/{{ item.src }}' "
with_items:
# This works around a bug in my Android app lol
- name: husky workaround
src: Pictures/Husky
dest: Pictures/Unsorted/Husky
- name: husky test workaround
src: Pictures/Husky Test
dest: Pictures/Unsorted/Husky
- name: move messaging to unsorted
src: Pictures/Messaging
dest: Pictures/Unsorted/Messaging
- name: move discord to unsorted
src: Pictures/Discord
dest: Pictures/Unsorted/Discord
- name: move camera roll to unsorted
src: Pictures/Camera Roll
dest: Pictures/Unsorted/Camera Roll
- name: move cp2077 to screenshots
src: Pictures/Cyberpunk 2077
dest: Pictures/Screenshots/Vidya/Cyberpunk 2077
tags: [ cron ]
- name: assure zone identifier cleanup cronjob
ansible.builtin.cron:
name: cleanup zone.identtifier
minute: 0
hour: 3
job: 'find /data/syncthing/data/ -type f -iname "*:Zone.Identifier" -delete'
tags: [ cron ]
- name: assure filename sanitize cronjobs
ansible.builtin.cron:
name: "sanitize {{ item }}"
minute: 0
hour: 4
job: 'find /data/syncthing/data/ -type f -iname "*{{ item }}" | while read line; do mv "$line" "${line%{{ item }}}"; done'
with_items:
- ?name=orig.png
- ?name=orig.jpeg
tags: [ cron ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data/syncthing/config
tags: [ backup ]
- role: ingress
vars:
ingress_container_image: "nginx:latest"
ingress_container_ports:
- 80:80
ingress_container_config_mount: /etc/nginx/conf.d
ingress_container_persist_dir: /data/nginx
ingress_listen_args: 80
ingress_listen_tls: no
ingress_servers:
- name: syncthing.local.desu.ltd
proxy_pass: http://syncthing:8384
tags: [ ingress ]

View File

@ -1,43 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Home media storage Pi
- hosts: pi-homeauto-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
pre_tasks:
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
tasks:
- name: include tasks for apps
include_tasks: tasks/app/{{ task }}
with_items:
- homeassistant.yml
loop_control:
loop_var: task
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
backup_time: "Sun *-*-* 02:00:00"
tags: [ backup ]
- role: ingress
vars:
ingress_container_image: "nginx:latest"
ingress_container_ports:
- 80:80
ingress_container_config_mount: /etc/nginx/conf.d
ingress_container_persist_dir: /data/nginx
ingress_listen_args: 80
ingress_listen_tls: no
ingress_servers:
- name: homeauto.local.desu.ltd
proxy_pass: http://localhost:8123
tags: [ ingress ]

View File

@ -1,12 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: vm-bastion-1.home.mgmt.desu.ltd
gather_facts: no
tasks:
- name: assure nfs mount directory
ansible.builtin.file: path=/nfs/projects state=directory mode=0755
tags: [ storage ]
- name: assure nfs mount
mount: path=/nfs/projects src=192.168.190.1:/nfs/projects fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
tags: [ storage ]

View File

@ -1,45 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Home media storage Pi
- hosts: vm-psql-1.home.mgmt.desu.ltd
roles:
- role: backup
vars:
backup_time: "Mon *-*-* 02:00:00"
tags: [ backup ]
- role: geerlingguy.postgresql
vars:
postgresql_global_config_options:
- option: listen_addresses
value: "*"
# All of these options are just for debugging stuff
# This IS a lab environment after all
- option: log_directory
value: "pg_log"
- option: log_filename
value: "postgresql-%Y-%m-%d_%H%M%S.log"
- option: log_statement
value: all
- option: logging_collector
value: "on"
postgresql_hba_entries:
- { type: local, database: all, user: postgres, auth_method: peer }
- { type: local, database: all, user: all, auth_method: md5 }
- { type: host, database: all, user: all, address: '127.0.0.0/8', auth_method: md5 }
- { type: host, database: all, user: all, address: '::1/128', auth_method: md5 }
# Used for internal access from other nodes
- { type: host, database: all, user: all, address: '192.168.0.0/16', auth_method: md5 }
postgresql_users:
- name: gulagbot-desultd
password: "{{ secret_gulagbot_db_pass }}"
- name: gulagbot-test
password: "{{ secret_gulagbot_db_pass }}"
- name: nagios
password: "{{ secret_postgresql_monitoring_password }}"
postgresql_databases:
- name: gulagbot-desultd
owner: gulagbot-desultd
- name: gulagbot-test
owner: gulagbot-test
tags: [ home, db, psql ]

View File

@ -1,35 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
# Home media storage Pi
- hosts: vm-fs-1.home.mgmt.desu.ltd
tasks:
- name: assure nfs directory
ansible.builtin.file: path=/nfs state=directory mode=0755
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
backup_time: "Mon *-*-* 02:00:00"
tags: [ backup ]
- role: geerlingguy.nfs
vars:
nfs_exports:
- "/nfs 192.168.0.0/16(rw,no_root_squash,sync) 172.24.0.0/16(rw,no_root_squash,sync)"
tags: [ storage, nfs ]
# - role: bertvv.samba
# vars:
# samba_users:
# - name: salt
# password: "{{ samba_user_salt_password }}"
# samba_shares:
# - name: media
# browseable: yes
# comment: 'Mass storage for all the things'
# group: salt
# guest_ok: yes
# owner: 911
# public: yes
# path: /nfs
# tags: [ storage, samba, smb ]

View File

@ -1,96 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
# Game servers
---
- hosts: vm-tes3mp-1.home.mgmt.desu.ltd
gather_facts: no
roles:
- role: docker-tes3mp
vars:
tes3mp_server_hostname: "The N'Wah Spitoon"
tes3mp_server_port: "55455"
tags: [ tes3mp ]
- role: backup
vars:
backup_s3backup_list_extra:
- /data
backup_s3backup_exclude_list_extra:
- /data/tes3mp/generic/backups
tags: [ backup ]
- hosts: vm-str-1.home.mgmt.desu.ltd
gather_facts: no
tasks:
- name: assure str container
docker_container:
name: str
state: started
image: tiltedphoques/st-reborn-server:latest
restart_policy: unless-stopped
pull: yes
ports:
- "10578:10578/udp"
volumes:
- /data/str/config:/home/server/config
- /data/str/data:/home/server/Data
- /data/str/logs:/home/server/logs
tags: [ str, skyrim, docker ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]
- hosts: vm-minecraft-2.home.mgmt.desu.ltd
gather_facts: no
roles:
- role: docker-minecraft
vars:
minecraft_name: oldpack
minecraft_external_port: 40501
minecraft_pack_zip: "https://srv.9iron.club/files/packs/1.7.10-magicpack/server.zip"
minecraft_image: "rehashedsalt/minecraft-forge:1.7.10-master"
minecraft_server_properties:
allow-flight: "true"
difficulty: "3"
motd: "Ya boy at it again with another playthrough of the same goddamn modpack"
tags: [ minecraft ]
- role: backup
vars:
backup_s3backup_list_extra:
- /data
- /etc
backup_s3backup_exclude_list_extra:
- /data/minecraft/oldpack/backups
tags: [ backup ]
- hosts: vm-terraria-1.home.mgmt.desu.ltd
gather_facts: no
roles:
- role: docker-tmodloader13
vars:
tmodloader_name: thorium
tmodloader_mods:
- ThoriumMod
- BossChecklist
- MagicStorageExtra
- SmartDoors
- SummonersAssociation
- VeinMiner
- Unleveled
- FKBossHealthBar
- ZoomOut
- AlchemistNPC
- BossCursor
- Bags_To_Money
- WingSlot
- StarsAbove
- SubworldLibrary
- StarsAboveMusic
tags: [ tmodloader, terraria ]
- role: backup
vars:
backup_s3backup_list_extra:
- /data
- /etc
backup_s3backup_exclude_list_extra:
- /data/terraria-thorium/backups
tags: [ backup ]

View File

@ -1,70 +0,0 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
---
- hosts: vm-media-1.home.mgmt.desu.ltd
gather_facts: no
module_defaults:
docker_container:
state: started
restart_policy: unless-stopped
pull: yes
pre_tasks:
- name: assure nfs mount directory
ansible.builtin.file: path=/data state=directory mode=0755
tags: [ pis, storage ]
- name: assure nfs mount
mount: path=/data/shared src=192.168.190.1:/nfs/media fstype=nfs4 opts="rsize=10248576,wsize=1048576,soft,timeo=600,retrans=2,_netdev" state=mounted
tags: [ pis, storage ]
- name: ensure docker network
docker_network: name=web
tags: [ docker ]
- name: include tasks for apps
include_tasks: tasks/app/{{ task }}
with_items:
- redis.yml
loop_control:
loop_var: task
tags: [ always ]
- name: include tasks for web services
include_tasks: tasks/web/{{ task }}
with_items:
- transmission.yml
- prowlarr.yml
- sonarr.yml
- radarr.yml
- lidarr.yml
- jellyfin.yml
loop_control:
loop_var: task
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data/transmisson
- /data/sonarr
backup_time: "Mon *-*-* 02:00:00"
tags: [ backup ]
- role: ingress
vars:
ingress_container_image: "nginx:latest"
ingress_container_ports:
- 80:80
ingress_container_config_mount: /etc/nginx/conf.d
ingress_container_persist_dir: /data/nginx
ingress_listen_args: 80
ingress_listen_tls: no
ingress_servers:
- name: transmission.local.desu.ltd
proxy_pass: http://transmission:9091
- name: prowlarr.local.desu.ltd
proxy_pass: http://prowlarr:9696
- name: jellyfin.local.desu.ltd
proxy_pass: http://jellyfin:8096
- name: sonarr.local.desu.ltd
proxy_pass: http://sonarr:8989
- name: radarr.local.desu.ltd
proxy_pass: http://radarr:7878
- name: lidarr.local.desu.ltd
proxy_pass: http://lidarr:8686
tags: [ ingress ]

View File

@ -122,28 +122,6 @@
value: vm-general-1.ashburn.mgmt.desu.ltd value: vm-general-1.ashburn.mgmt.desu.ltd
- record: transmission.media.desu.ltd - record: transmission.media.desu.ltd
value: vm-general-1.ashburn.mgmt.desu.ltd value: vm-general-1.ashburn.mgmt.desu.ltd
# Local
- record: homeauto.local.desu.ltd
value: pi-homeauto-1.home.mgmt.desu.ltd
- record: jackett.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
state: absent
- record: prowlarr.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: jellyfin.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: radarr.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: sonarr.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: lidarr.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: syncthing.local.desu.ltd
value: vm-syncthing-1.home.mgmt.desu.ltd
- record: transmission.local.desu.ltd
value: zt1.vm-media-1.home.mgmt.desu.ltd
- record: octoprint.local.desu.ltd
value: wlan0.pi-octoprint-1.home.mgmt.desu.ltd
loop_control: loop_control:
label: "{{ item.record }}" label: "{{ item.record }}"
delegate_to: localhost delegate_to: localhost

View File

@ -3,14 +3,6 @@
--- ---
# Main playbooks for machines across my environments # Main playbooks for machines across my environments
# Does not include supplementary management configuration # Does not include supplementary management configuration
# Home configuration
- import_playbook: home_db.yml
- import_playbook: home_fs.yml
- import_playbook: home_app.yml
- import_playbook: home_game.yml
- import_playbook: home_media.yml
- import_playbook: home_automation.yml
- import_playbook: home_bastion.yml
# Production configuration # Production configuration
- import_playbook: prod_db.yml - import_playbook: prod_db.yml
- import_playbook: prod_web.yml - import_playbook: prod_web.yml