Make a box to move Stalin back home where he belongs

This commit is contained in:
Salt 2021-11-19 20:38:20 -06:00
parent cff68a2a73
commit ee5f8ffe92
6 changed files with 30 additions and 8 deletions

22
playbooks/home_app.yml Executable file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
# Webservers
---
- hosts: vm-bot-1.home.mgmt.desu.ltd
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/gulagbot.yml
tags: [ always ]
roles:
- role: backup
vars:
backup_s3backup_list_extra:
- /data
tags: [ backup ]

View File

@ -12,7 +12,7 @@
vars: vars:
postgresql_global_config_options: postgresql_global_config_options:
- option: listen_addresses - option: listen_addresses
value: 192.168.103.1,172.23.103.1,127.0.0.1 value: "*"
postgresql_hba_entries: postgresql_hba_entries:
- { type: local, database: all, user: postgres, auth_method: peer } - { type: local, database: all, user: postgres, auth_method: peer }
- { type: local, database: all, user: all, auth_method: md5 } - { type: local, database: all, user: all, auth_method: md5 }
@ -23,7 +23,11 @@
# Allow hosts over zerotier # Allow hosts over zerotier
- { type: host, database: all, user: all, address: '172.23.0.0/16', auth_method: md5 } - { type: host, database: all, user: all, address: '172.23.0.0/16', auth_method: md5 }
postgresql_users: postgresql_users:
- name: gulagbot-desultd
password: "{{ secret_gulagbot_db_pass }}"
- name: nagios - name: nagios
password: "{{ secret_postgresql_monitoring_password }}" password: "{{ secret_postgresql_monitoring_password }}"
postgresql_databases: [] postgresql_databases:
- name: gulagbot-desultd
owner: gulagbot-desultd
tags: [ home, db, psql ] tags: [ home, db, psql ]

View File

@ -25,8 +25,6 @@
postgresql_users: postgresql_users:
- name: gitea-desultd - name: gitea-desultd
password: "{{ secret_gitea_db_pass }}" password: "{{ secret_gitea_db_pass }}"
- name: gulagbot-desultd
password: "{{ secret_gulagbot_db_pass }}"
- name: gulagbot-test - name: gulagbot-test
password: "{{ secret_gulagbot_test_db_pass }}" password: "{{ secret_gulagbot_test_db_pass }}"
- name: nagios - name: nagios
@ -44,8 +42,6 @@
postgresql_databases: postgresql_databases:
- name: gitea-desultd - name: gitea-desultd
owner: gitea-desultd owner: gitea-desultd
- name: gulagbot-desultd
owner: gulagbot-desultd
- name: gulagbot-test - name: gulagbot-test
owner: gulagbot-test owner: gulagbot-test
- name: netbox-desultd - name: netbox-desultd

View File

@ -15,7 +15,6 @@
- name: include tasks for applications - name: include tasks for applications
include_tasks: tasks/{{ item }} include_tasks: tasks/{{ item }}
with_items: with_items:
- app/gulagbot.yml
- app/redis.yml - app/redis.yml
- web/9iron.yml - web/9iron.yml
- web/desultd.yml - web/desultd.yml

View File

@ -5,7 +5,7 @@
image: rehashedsalt/gulagbot:latest image: rehashedsalt/gulagbot:latest
env: env:
DISCORD_TOKEN: "{{ secret_gulagbot_discord_token }}" DISCORD_TOKEN: "{{ secret_gulagbot_discord_token }}"
PGHOST: 192.168.164.156 PGHOST: 192.168.1.29
PGDATABASE: gulagbot-desultd PGDATABASE: gulagbot-desultd
PGUSER: gulagbot-desultd PGUSER: gulagbot-desultd
PGPASSWORD: "{{ secret_gulagbot_db_pass }}" PGPASSWORD: "{{ secret_gulagbot_db_pass }}"

View File

@ -20,6 +20,7 @@
# Home configuration # Home configuration
- import_playbook: playbooks/home_db.yml - import_playbook: playbooks/home_db.yml
- import_playbook: playbooks/home_fs.yml - import_playbook: playbooks/home_fs.yml
- import_playbook: playbooks/home_app.yml
- import_playbook: playbooks/home_media.yml - import_playbook: playbooks/home_media.yml
- import_playbook: playbooks/home_automation.yml - import_playbook: playbooks/home_automation.yml
# Production configuration # Production configuration