Abstract
This progress will setup the
postgresql
, configure forpostgresql
for remote access on docker image
For running to set up postgresql
in VM. Go for it with commands
Notice:
- Upgrading your specify hosts from
hosts
file and verifyssh-key
with yourssh-agent
#!/bin/bash
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/<YOUR_SSH_KEY>
ansible <YOUR_HOSTS> -i inventories/hosts -m ping (200 Succeed - Moving to next step)
-
Deprecated: Configuration your pg_hba.conf and postgresql.conf on templates folder ⇒ Changing into use
PostgreSQL
database inside container but thispg_hba
&postgresql.conf
still work if you find the right path to mounting. -
Running the ansible for setup postgresql and configure your postgresql. This configuration will put inside
YAML
style and refer with this article to deployment viaansible
#!/bin/bash
ansible-playbook -i inventories/hosts --extra-vars name_machine=deal_platform --tags update general-tasks.yaml
ansible-playbook -i inventories/hosts --extra-vars name_machine=deal_platform --tags install general-tasks.yaml
ansible-playbook -i inventories/hosts --tags install_psql postgres_docker_tasks.yaml