ansible/inventory.yml
2024-10-27 23:06:55 +01:00

236 lines
6.8 KiB
YAML

all:
vars:
ansible_python_interpreter: /usr/bin/python3
lxc:
hosts:
dns.vm.chapo.li:
ansible_host: 10.255.3.1
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 16 }
dns_local: True
dns-ext.vm.chapo.li:
ansible_host: 10.255.3.2
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 16 }
dns_local: False
cloud.vm.chapo.li:
ansible_host: 10.255.3.3
resources: { cpu: 4, ram: 8192, swap: 1024, disk: 256 }
grafana.vm.chapo.li:
ansible_host: 10.255.3.4
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 64 }
cname: [ prometheus.vm.chapo.li ]
galene.vm.chapo.li:
ansible_host: 10.255.3.5
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 8 }
vault.vm.chapo.li:
ansible_host: 10.255.3.6
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 32 }
health.vm.chapo.li:
ansible_host: 10.255.3.7
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 8 }
cryptpad.vm.chapo.li:
ansible_host: 10.255.3.8
resources: { cpu: 2, ram: 2048, swap: 1024, disk: 128 }
cryptpad-cse.vm.chapo.li:
ansible_host: 10.255.3.9
resources: { cpu: 2, ram: 2048, swap: 1024, disk: 128 }
wikijs.vm.chapo.li:
ansible_host: 10.255.3.10
resources: { cpu: 1, ram: 2048, swap: 1024, disk: 16 }
git.vm.chapo.li:
ansible_host: 10.255.3.11
resources: { cpu: 2, ram: 1024, swap: 1024, disk: 64 }
bot.vm.chapo.li:
ansible_host: 10.255.3.12
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 8 }
todo.vm.chapo.li:
ansible_host: 10.255.3.13
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 16 }
mail.vm.chapo.li:
ansible_host: 10.255.3.14
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 32 }
xmpp.vm.chapo.li:
ansible_host: 10.255.3.15
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 32 }
sharkey.vm.chapo.li:
ansible_host: 10.255.3.16
resources: { cpu: 4, ram: 4096, swap: 1024, disk: 128 }
status.vm.chapo.li:
ansible_host: 10.255.3.17
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 16 }
action.vm.chapo.li:
ansible_host: 10.255.3.18
resources: { cpu: 4, ram: 2048, swap: 1024, disk: 32 }
monica.vm.chapo.li:
ansible_host: 10.255.3.19
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 32 }
cname: [ monica2.vm.chapo.li ]
blog.vm.chapo.li:
ansible_host: 10.255.3.20
resources: { cpu: 1, ram: 1024, swap: 1024, disk: 16 }
perdu.vm.chapo.li:
ansible_host: 10.255.3.21
resources: { cpu: 2, ram: 2048, swap: 1024, disk: 64 }
vars:
ansible_user: root
managed:
children:
lxc:
hosts:
gandalf.hw.chapo.li:
ansible_host: 10.255.2.1
dns:
hosts:
dns.vm.chapo.li:
dns-ext.vm.chapo.li:
grafana:
hosts:
grafana.vm.chapo.li:
mail:
hosts:
mail.vm.chapo.li:
acme:
hosts:
status.vm.chapo.li:
renewal_hook: systemctl restart nginx
monica.vm.chapo.li:
renewal_hook: systemctl restart nginx
docker:
hosts:
cloud.vm.chapo.li:
vault.vm.chapo.li:
health.vm.chapo.li:
cryptpad.vm.chapo.li:
cryptpad-cse.vm.chapo.li:
wikijs.vm.chapo.li:
git.vm.chapo.li:
todo.vm.chapo.li:
sharkey.vm.chapo.li:
status.vm.chapo.li:
action.vm.chapo.li:
monica.vm.chapo.li:
backup:
hosts:
vault.vm.chapo.li:
backup:
pre_hook: [ "docker compose -f /root/vaultwarden/docker-compose.yml down" ]
paths: [ "/root/vaultwarden/data", "/root/vaultwarden/docker-compose.yml" ]
post_hook: [ "docker compose -f /root/vaultwarden/docker-compose.yml up -d" ]
cryptpad.vm.chapo.li:
backup:
pre_hook: [ "docker compose -f /root/docker-compose.yml down" ]
paths: [ "/root/data", "/root/docker-compose.yml", "/root/customize/application_config.js", "/root/config.js" ]
post_hook: [ "docker compose -f /root/docker-compose.yml up -d" ]
git.vm.chapo.li:
backup:
pre_hook:
- docker exec -u git -it -w /tmp forgejo bash -c 'forgejo dump --file /tmp/forgejo.zip'
- docker cp forgejo:/tmp/forgejo.zip /tmp
- docker exec -u git -it -w /tmp forgejo bash -c 'rm /tmp/forgejo.zip'
- mkdir /tmp/backup
- unzip /tmp/forgejo.zip -d /tmp/backup
- docker exec forgejo-db-1 pg_dump -U forgejo > /tmp/backup/pgdump.sql
paths: [ "/tmp/backup", "/root/forgejo/docker-compose.yml" ]
post_hook: [ "rm -r /tmp/backup" ]
todo.vm.chapo.li:
vikunja_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
31653361396266666232303366643335343061383331383063356131653739623037353735666633
6365303139613334633536363466616262356261643831660a616338316339656638396164666530
36653538313537373539656362313638386531393039323738633466323132346636643061373330
3266333762623739380a653362656232323165616263366264653834653938366463333361666465
3465
backup:
pre_hook:
- docker exec -i -w /tmp vikunja-db-1 bash -c 'mysqldump --password={{ vikunja_password }} vikunja > /tmp/vikunja-backup.sql'
- docker cp vikunja-db-1:/tmp/vikunja-backup.sql /tmp
- docker exec -i -w /tmp vikunja-db-1 bash -c 'rm /tmp/vikunja-backup.sql'
paths: [ /root/vikunja/files, /tmp/vikunja-backup.sql, /root/vikunja/config.js, /root/vikunja/docker-compose.yml ]
post_hook: [ "rm -r /tmp/vikunja-backup.sql" ]
mail.vm.chapo.li:
backup:
pre_hook: []
paths: [ /data/vmail ]
post_hook: []
xmpp.vm.chapo.li:
backup:
pre_hook: []
paths: [ /var/lib/prosody, /etc/prosody ]
post_hook: []
sharkey.vm.chapo.li:
backup:
pre_hook: [ "docker exec -it sharkey-db-1 pg_dump firefish --user example-firefish-user --format=plain > /tmp/sharkey.sql" ]
paths: [ "/root/sharkey/files", "/tmp/sharkey.sql", /root/sharkey/docker-compose.yml, /root/sharkey/.config ]
post_hook: [ "rm /tmp/sharkey.sql" ]
status.vm.chapo.li:
backup:
pre_hook: []
paths: [ /root/docker-compose.yml, /root/uptime-kuma-data, /etc/nginx/sites-enabled/status.conf ]
post_hook: []
unmanaged:
hosts:
freebox.gw.chapo.li:
ansible_host: 192.168.1.254
cirdan.gw.chapo.li:
ansible_host: 192.168.1.250
cirdan.client.chapo.li:
ansible_host: 10.255.1.254
cirdan.hw.chapo.li:
ansible_host: 10.255.2.254
cirdan.vm.chapo.li:
ansible_host: 10.255.3.254
cirdan.wg.chapo.li:
ansible_host: 172.31.0.254
amber.wg.chapo.li:
ansible_host: 172.31.0.128
dillon.vm.chapo.li:
ansible_host: 10.255.3.100
jung.vm.chapo.li:
ansible_host: 10.255.3.101
cname: [ s3.vm.chapo.li ]
localhost:
ansible_connection: local