Ansible Role for PostgreSQL Installation.
This role require Ansible 2.0 or higher.
This role was designed for Ubuntu Server 14.04 LTS and Ubuntu Server 16.04 LTS.
parameter | required | default | choices | comments |
---|---|---|---|---|
postgresql_data_directory | yes | /var/lib/postgresql/9.3/main | Specifies the directory to use for data storage. | |
postgresql_datestyle | yes | iso, mdy | Sets the display format for date and time values, as well as the rules for interpreting ambiguous date input values. | |
postgresql_default_text_search_config | yes | pg_catalog.english | Selects the text search configuration that is used by those variants of the text search functions that do not have an explicit argument specifying the configuration. | |
postgresql_external_pid_file | yes | /var/run/postgresql/9.3-main.pid | Specifies the name of an additional process-ID (PID) file that the server should create for use by server administration programs. | |
postgresql_hba | yes | defaults/main.yml | Host-based authentication setting. | |
postgresql_hba_file | yes | /etc/postgresql/9.3/main/pg_hba.conf | Specifies the configuration file for host-based authentication (customarily called pg_hba.conf). | |
postgresql_ident_file | yes | /etc/postgresql/9.3/main/pg_ident.conf | Specifies the configuration file for Section 19.2 user name mapping (customarily called pg_ident.conf). | |
postgresql_lc_messages | yes | en_US.UTF-8 | Sets the language in which messages are displayed. | |
postgresql_lc_monetary | yes | en_US.UTF-8 | Sets the locale to use for formatting monetary amounts, for example with the to_char family of functions. | |
postgresql_lc_numeric | yes | en_US.UTF-8 | Sets the locale to use for formatting numbers, for example with the to_char family of functions. | |
postgresql_lc_time | yes | en_US.UTF-8 | Sets the locale to use for formatting dates and times, for example with the to_char family of functions. | |
postgresql_listen_addresses | yes | localhost | Specifies the TCP/IP address(es) on which the server is to listen for connections from client applications. | |
postgresql_log_line_prefix | yes | %t | This is a printf-style string that is output at the beginning of each log line. | |
postgresql_log_timezone | yes | UTC | Sets the time zone used for timestamps written in the server log. | |
postgresql_max_connections | yes | 100 | Determines the maximum number of concurrent connections to the database server. | |
postgresql_port | yes | 5432 | The TCP port the server listens on; 5432 by default. | |
postgresql_shared_buffers | yes | 128MB | Sets the amount of memory the database server uses for shared memory buffers. | |
postgresql_ssl | yes | true |
|
Enables SSL connections. |
postgresql_ssl_cert_file | yes | /etc/ssl/certs/ssl-cert-snakeoil.pem | Specifies the name of the file containing the SSL server certificate. | |
postgresql_ssl_key_file | yes | /etc/ssl/private/ssl-cert-snakeoil.key | Specifies the name of the file containing the SSL server private key. | |
postgresql_stats_temp_directory | yes | /var/run/postgresql/9.5-main.pg_stat_tmp | Sets the directory to store temporary statistics data in. | |
postgresql_timezone | yes | UTC | Sets the time zone for displaying and interpreting time stamps. | |
postgresql_unix_socket_directories | yes | /var/run/postgresql | Specifies the directory of the Unix-domain socket(s) on which the server is to listen for connections from client applications. |
No additional role dependencies.
- hosts: all
roles:
- role: hswong3i.postgresql
- Wong Hoi Sing Edison