Skip to content

Ansible role to install and configure postgresql a host.

License

Notifications You must be signed in to change notification settings

dgnest/ansible-role-postgresql

Repository files navigation

Ansible Role for PostgreSQL

Build Status GitHub issues GitHub license

A role for deploying and configuring PostgreSQL and extensions on unix hosts using Ansible It can additionally be used as a playbook for quickly provisioning hosts. Vagrant machines are provided to produce a boxed install of PostgreSQL or a VM for integration testing.

Supports

Supported PostgreSQL versions:

  • PostgreSQL 9.6
  • PostgreSQL 9.5
  • PostgreSQL 9.4
  • PostgreSQL 9.3

Supported targets:

  • Ubuntu 14.04 LTS "Trusty Tahr"
  • Ubuntu 12.04 LTS "Precise Pangolin"
  • Debian (untested)
  • RedHat (untested)

Requirements

  • Linux
    • none
  • OSX

Role Variables

The default role variables in defaults/main.yml are:

```yaml
# PostgreSQL
postgresql_version: 9.4
postgresql_listen_addresses:
  - '*'

postgresql_databases:
  - name: 'test_data'
    port: 5432

postgresql_users:
  - db: 'name_database'
    name: 'user'
    password: 'P@ssw0rd'
    priv: ALL
    role_attr_flags: SUPERUSER
```

Dependencies

none

Example Playbook

See the examples directory.

To run this playbook with default settings, create a basic playbook like this:

- hosts: servers
  roles:
     - postgresql

To install a specific version:

- hosts: servers
  roles:
     - { role: dgnest.postgresql }

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

About

Ansible role to install and configure postgresql a host.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published