honatas.postgresql_dev
PostgreSQL for Development
This is an Ansible role designed for a simple installation of PostgreSQL, specifically for development environments, such as Vagrant boxes. It installs both the database and the command-line client, allowing remote access so you can connect from outside the Vagrant virtual machine (like using DBeaver on your host machine—just remember to set up port forwarding in your Vagrantfile).
The software is installed using PostgreSQL's PPA, which you can find here.
PostgreSQL is set up as a systemd service called postgres.
Role Variables
postgres_version: The version of PostgreSQL to install.
Default: 12postgres_ubuntu_version: The version name of Ubuntu where PostgreSQL will be installed.
Default: focal
Example Playbook
Default installation:
roles:
- honatas.postgresql_dev
To install PostgreSQL 11 on Ubuntu 18.04:
roles:
- { role: honatas.postgresql_dev, postgresql_version: 11, postgresql_ubuntu_version: bionic }
Dependencies
None
Requirements
None
License
MIT
Contributions
You are welcome to open an issue or submit a pull request anytime. Seriously, feel free!
Also, if you enjoy my work, I want you to know I’m a big fan of coffee.
PPA Installation of PostgreSQL with remote access enabled. Suited for development, works nicely on Vagrant boxes.
ansible-galaxy install honatas.postgresql_dev