Add home db playbook

This commit is contained in:
Salt 2021-11-08 16:44:04 -06:00
parent d4a25acaeb
commit cb6581b708
2 changed files with 30 additions and 0 deletions

29
playbooks/home_db.yml Executable file
View File

@ -0,0 +1,29 @@
#!/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: 192.168.103.1,172.23.103.1,127.0.0.1
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 }
# Allow hosts over zerotier
- { type: host, database: all, user: all, address: '172.23.0.0/16', auth_method: md5 }
postgresql_users:
- name: nagios
password: "{{ secret_postgresql_monitoring_password }}"
postgresql_databases: []
tags: [ home, db, psql ]

View File

@ -17,6 +17,7 @@
- import_playbook: playbooks/device_roles_game.yml - import_playbook: playbooks/device_roles_game.yml
- import_playbook: playbooks/device_roles_workstation.yml - import_playbook: playbooks/device_roles_workstation.yml
# Home configuration # Home configuration
- import_playbook: playbooks/home_db.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