Skip to content

Latest commit

 

History

History
61 lines (49 loc) · 1.45 KB

role_configure_instances.md

File metadata and controls

61 lines (49 loc) · 1.45 KB

Role Name

A role to init and configure your postgres instances.

Requirements

To use this role, you shouldinstall and configure postgres from the PGDG. For that you can check the other role from this collection.

Role Variables

postgresql_instances:
  - name: "test2"
    port: 5438
    state: present
    postgresql_version: 10
    pgdata_path: /var/lib/postgresql/10/test2
  - name: "test3"
    port: 5439
    state: present
    postgresql_version: 12
    pgdata_path: /var/lib/postgresql/12/test3
    custom_config_options:
      - listen: "*"

Dependencies

You should use other role from this collection to install and configure postgres from the PGDG repo. For that you can use the following roles:

  • configure_extra_repo
  • postgres_install

Example Playbook

- hosts: servers
  vars:
      postgresql_instances:
      - name: "test2"
        port: 5438
        state: present
        postgresql_version: 10
        pgdata_path: /var/lib/postgresql/10/test2
  roles:
     - { role: l00ptr.configure_extra_repo }
     - { role: l00ptr.postgresql_install }
     - { role: l00ptr.configure_instances }

License

MIT/BSD

Author Information

This role was first created in 2016 by Jeff Geerling then forked (mostly to split it into more atomic roles) by Julian Vanden Broeck (in 2020)