postgresql_version: "15.2" # Options postgresql_group: "postgresql" postgresql_superuser_db: "postgres" postgresql_superuser_name: "postgres" postgresql_superuser_password: "postgres" # SSL options postgresql_ssl: true postgresql_ssl_keep_nonssl_endpoint: false postgresql_self_signed_cert: true postgresql_self_signed_cert_name: "cert" ## Backup options postgresql_wal_g_install: false postgresql_password_encryption_algorithm: "scram-sha-256" postgresql_default_parameters: data_directory: '{{ postgresql_data_dir }}' listen_addresses: '*' max_connections: '1000' superuser_reserved_connections: '5' shared_buffers: '{{ (ansible_memory_mb.real.total * 0.25) | round | int }}MB' huge_pages: 'try' dynamic_shared_memory_type: 'posix' max_worker_processes: '{{ ansible_processor_vcpus }}' max_parallel_workers: '{{ ansible_processor_vcpus }}' max_parallel_workers_per_gather: '{{ (ansible_processor_vcpus / 2) | round | int }}' max_parallel_maintenance_workers: '{{ (ansible_processor_vcpus / 2) | round | int }}' max_wal_size: '1GB' min_wal_size: '80MB' log_destination: 'stderr' logging_collector: 'on' log_directory: 'log' log_filename: 'postgresql-%a.log' log_rotation_age: '1d' log_rotation_size: '0' log_truncate_on_rotation: 'on' log_line_prefix: '%m [%p] ' log_timezone: 'Europe/Moscow' datestyle: 'iso, mdy' timezone: 'Europe/Moscow' lc_messages: '{{ postgresql_system_locale | default("en_US.UTF-8") }}' lc_monetary: '{{ postgresql_system_locale | default("en_US.UTF-8") }}' lc_numeric: '{{ postgresql_system_locale | default("en_US.UTF-8") }}' lc_time: '{{ postgresql_system_locale | default("en_US.UTF-8") }}' default_text_search_config: 'pg_catalog.english' password_encryption: '{{ postgresql_password_encryption_algorithm }}' postgresql_backup_parameters: archive_command: "{{ postgresql_archive_command | default('cd .')}}" restore_command: "{{ postgresql_restore_command | default('cd .') }}" archive_mode: on postgresql_log_dir: "/var/log/postgresql" postgresql_supported_versions: - 13 - 14 - 15