postgres
Setup a PostgreSQL database server. PostgreSQL is a powerful, open source object-relational database system with over 30 years of active development that has earned it a strong reputation for reliability, feature robustness, and performance.
- Default Variables
- postgres_base_dir
- postgres_clean_hba_file
- postgres_connection_addresses
- postgres_connection_port
- postgres_db
- postgres_dbs
- postgres_dbs_extra
- postgres_group
- postgres_hba_entries
- postgres_hba_entries_extra
- postgres_log_destination
- postgres_log_directory
- postgres_log_filename
- postgres_log_rotation_age
- postgres_log_rotation_size
- postgres_password_encryption
- postgres_repository_enabled
- postgres_repository_filename
- postgres_socket_directories
- postgres_tls_cert_filename
- postgres_tls_cert_source
- postgres_tls_enabled
- postgres_tls_key_filename
- postgres_tls_key_source
- postgres_user
- postgres_users
- postgres_users_extra
- postgres_version
- Discovered Tags
- Dependencies
postgres_base_dir: _osdefault_
postgres_clean_hba_file: true
postgres_connection_addresses:
- localhost
postgres_connection_port: 5432
postgres_db:
- name: "my_app"
lc_collate: "en_US.UTF-8"
lc_ctype: "en_US.UTF-8"
encoding: "UTF-8"
template: "template0"
login_host: "localhost"
login_password: "_omit_"
login_user: "{{ postgres_user }}"
login_unix_socket: "_omit_"
port: "_omit_"
owner: "_omit_"
state: "present"
postgres_dbs: []
postgres_dbs_extra: []
postgres_group: postgres
postgres_hba_entries:
- contype: local
databases:
- all
users:
- all
auth_method: trust
- contype: host
databases:
- all
users:
- all
address: 127.0.0.1/32
auth_method: '{{ postgres_password_encryption }}'
- contype: host
databases:
- all
users:
- all
address: ::1/128
auth_method: '{{ postgres_password_encryption }}'
postgres_hba_entries_extra: []
postgres_log_destination:
- stderr
postgres_log_directory: log
postgres_log_filename: postgresql.log
postgres_log_rotation_age: 1d
postgres_log_rotation_size: 0
postgres_password_encryption: scram-sha-256
postgres_repository_enabled: false
postgres_repository_filename: Postgresql-{{ postgres_version | regex_replace('\.')
}}
postgres_socket_directories:
- /var/run/postgresql
postgres_tls_cert_filename: mycert.pem
postgres_tls_cert_source: mycert.pem
postgres_tls_enabled: false
postgres_tls_key_filename: mykey.pem
postgres_tls_key_source: mykey.pem
postgres_user: postgres
postgres_users: []
postgres_users:
- name: jdoe #required; the rest are optional
password: # defaults to not set
encrypted: # defaults to 'yes'
priv: # defaults to not set
role_attr_flags: # defaults to not set
db: # defaults to not set
login_host: # defaults to 'localhost'
login_password: # defaults to not set
login_user: # defaults to '{{ postgres_user }}'
login_unix_socket: # defaults to 1st of postgres_socket_directories
port: # defaults to not set
state: # defaults to 'present'
pam_user: # defaults to not set
postgres_users_extra: []
postgres_version: 14
- tls_renewal
None.