No description
- Shell 100%
| defaults | ||
| files | ||
| meta | ||
| tasks | ||
| .gitignore | ||
| README.md | ||
ansible-roles-postgres
This role is designed to provide a basic postgresql podman deployment
- https://www.postgresql.org/
- https://hub.docker.com/_/postgres/
- https://github.com/mrts/docker-postgresql-multiple-databases
Set initial password
podman exec -it authentik-server ak changepassword akadmin
Task Configuration
- name: Setup postgres
hosts: somehost
become: true
roles:
- role: postgres
postgres_db_name: somedatabase
postgres_db_user someuser
postgres_db_password somepassword
- role: firewalld
firewalld_add:
- name: public
ports:
- 5432/tcp
Deployment and Removal
Sometimes you need to manually stop the running containers to get a clean run when re-deploying Services must be stopped as the respecitve user or another means to aquire the correct user scope for systemd
systemctl --user stop container-postgres.service
Deploy
ansible-playbook -i hosts site.yml --tags=firewalld,postgres --limit=somehost
Remove
ansible-playbook -i hosts site.yml --tags=firewalld,postgres --extra-vars "container_state=absent firewall_action=remove" --limit=somehost