Skip to content

okchaty/ansible-role-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Role for PostgreSQL

Build Status GitHub issues GitHub license

Version:0.2.0
Web:https://github.com/okchaty/ansible-role-postgresql
Download:http://github.com/okchaty/ansible-role-postgresql
Source:http://github.com/okchaty/ansible-role-postgresql
Keywords:ansible-role-postgresql

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
  • Homebrew must be installed.

Role Variables

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

# 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

Enabled Postgis

postgresql_postgis: yes

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: okchaty.postgresql }

To make generate backup:

postgresql_backups:
  - name: "{{ postgresql_database_name }}"
    user: "{{ postgresql_user }}"
    pass: "{{ postgresql_pass }}"
    host: "127.0.0.1"
    bucket: "{{ aws_bucket_backup }}"
    bucket_path: "{{ application_stage }}"
    user_system: "{{ user }}"
- hosts: servers
  roles:
    - role: okchaty.postgresql
       backup_only: yes

Support

If you want to support this project, i only accept IOTA :p.

Address: FTDCZELEMOQGL9MBWFZENJLFIZUBGMXLFVPRB9HTWYDYPTFKASJCEGJMSAXUWDQC9SJUDMZVIQKACQEEYPEUYLAMMD

Team

Luis Mayta
luis mayta

License

MIT

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Contributions are welcome!

Review the CONTRIBUTING for details on how to:

  • Submit issues
  • Submit pull requests

Contact Info

Feel free to contact me to discuss any issues, questions, or comments.

linkedin beacon made

Made with ☕ and 🍕 by luis mayta and okchaty.