forked from ISTI-ansible-roles/ansible-roles
73 lines
2.9 KiB
YAML
73 lines
2.9 KiB
YAML
---
|
|
|
|
pg_use_postgresql_org_repo: True
|
|
|
|
# 9.3 is the default version for Ubuntu trusty
|
|
# It is highly recommended to use the postgresql.org repositories
|
|
#
|
|
# See the features matrix here: http://www.postgresql.org/about/featurematrix/
|
|
#
|
|
psql_version: 9.4
|
|
psql_db_host: localhost
|
|
psql_db_port: 5432
|
|
psql_db_size_w: 150000000
|
|
psql_db_size_c: 170000000
|
|
psql_listen_on_ext_int: False
|
|
psql_use_alternate_data_dir: False
|
|
psql_data_dir: '/var/lib/postgresql/{{ psql_version }}'
|
|
psql_conf_parameters:
|
|
- { name: 'max_connections', value: '100', set: 'False' }
|
|
- { name: 'ssl', value: 'true', set: 'False' }
|
|
- { name: 'shared_buffers', value: '24MB', set: 'False' }
|
|
- { name: 'temp_buffers', value: '8MB', set: 'False' }
|
|
- { name: 'work_mem', value: '1MB', set: 'False' }
|
|
- { name: 'maintenance_work_mem', value: '16MB', set: 'False' }
|
|
- { name: 'max_stack_depth', value: '2MB', set: 'False' }
|
|
- { name: 'wal_level', value: 'minimal', set: 'False' }
|
|
- { name: 'checkpoint_segments', value: '3', set: 'False' }
|
|
- { name: 'max_files_per_process', value: '1000', set: 'False' }
|
|
|
|
psql_set_shared_memory: False
|
|
psql_sysctl_file: 30-postgresql-shm.conf
|
|
psql_sysctl_kernel_sharedmem_parameters:
|
|
- { name: 'kernel.shmmax', value: '33554432' }
|
|
- { name: 'kernel.shmall', value: '2097152' }
|
|
|
|
postgresql_pkgs:
|
|
- postgresql-'{{ psql_version }}'
|
|
- postgresql-contrib-'{{ psql_version }}'
|
|
- postgresql-client-'{{ psql_version }}'
|
|
- pgtop
|
|
|
|
|
|
psql_db_name: db_name
|
|
psql_db_user: db_user
|
|
psql_db_pwd: "We cannot save the password into the repository. Use another variable and change pgpass.j2 accordingly. Encrypt the file that contains the variable with ansible-vault"
|
|
|
|
|
|
|
|
postgres_install_gis_extensions: False
|
|
postgres_gis_version: 2.1
|
|
postgres_gis_pkgs:
|
|
- postgresql-'{{ psql_version }}'-postgis-'{{ postgres_gis_version }}'
|
|
|
|
pg_backup_logdir: /var/log/postgresql
|
|
pg_backup_bin: /usr/local/sbin/postgresql-backup
|
|
pg_backup_pgdump_bin: /usr/bin/pg_dump
|
|
pg_backup_retain_copies: 15
|
|
pg_backup_build_db_list: "no"
|
|
pg_backup_db_list: '{{ psql_db_name}}'
|
|
pg_backup_destdir: /var/lib/pgsql/backups
|
|
pg_backup_logdir: /var/log/postgresql
|
|
pg_backup_logfile: '{{ pg_backup_logdir }}/postgresql-backup.log'
|
|
pg_backup_use_auth: "yes"
|
|
pg_backup_pass_file: /root/.pgpass
|
|
pg_backup_use_nagios: "yes"
|
|
|
|
#psql_db_data:
|
|
# Example of line needed to create a db, create the user that owns the db, manage the db accesses (used by iptables too). All the fields are mandatory.
|
|
#- { name: '{{ psql_db_name }}', encoding: 'UTF8', user: '{{ psql_db_user }}', pwd: '{{ psql_db_pwd }}', roles: 'NOCREATEDB,NOSUPERUSER', allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ] }
|
|
# Example of line needed to manage the db accesses (used by iptables too), without creating the db and the user. Useful, for example, to give someone access to the postgresql db
|
|
#- { name: '{{ psql_db_name }}', user: '{{ psql_db_user }}', allowed_hosts: [ 'xxx.xxx.xxx.xxx/32', 'yyy.yyy.yyy.yyy/32' ] }
|
|
|