Switching over to using unix sockets for ICP
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
--auth-local=peer
|
||||
--auth-host={{ postgresql_auth_method }}
|
||||
{{ '--data-checksums' if postgresql_data_checksums else '' }}
|
||||
become: yes
|
||||
become: true
|
||||
become_user: postgres
|
||||
when: not postgresql_initialized.stat.exists
|
||||
notify: restart postgresql
|
||||
@@ -74,19 +74,29 @@
|
||||
state: "{{ postgresql_service_state }}"
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Wait for PostgreSQL to be ready
|
||||
- name: Wait for PostgreSQL Unix socket to be ready
|
||||
wait_for:
|
||||
path: "{{ postgresql_unix_socket_directories }}/.s.PGSQL.{{ postgresql_port }}"
|
||||
timeout: 30
|
||||
when:
|
||||
- postgresql_service_state == "started"
|
||||
- postgresql_listen_addresses == "" # Socket-only mode
|
||||
|
||||
- name: Wait for PostgreSQL TCP to be ready
|
||||
wait_for:
|
||||
port: "{{ postgresql_port }}"
|
||||
host: "{{ postgresql_listen_addresses }}"
|
||||
timeout: 30
|
||||
when: postgresql_service_state == "started"
|
||||
when:
|
||||
- postgresql_service_state == "started"
|
||||
- postgresql_listen_addresses != "" # TCP mode
|
||||
|
||||
- name: Display PostgreSQL infrastructure status
|
||||
debug:
|
||||
msg: |
|
||||
✅ PostgreSQL infrastructure ready!
|
||||
|
||||
📡 Service: {{ postgresql_listen_addresses }}:{{ postgresql_port }}
|
||||
📡 Service: {% if postgresql_listen_addresses == "" %}Unix socket only at {{ postgresql_unix_socket_directories }}{% else %}{{ postgresql_listen_addresses }}:{{ postgresql_port }}{% endif %}
|
||||
🔒 Auth: {{ postgresql_auth_method }}
|
||||
📊 Checksums: {{ 'Enabled' if postgresql_data_checksums else 'Disabled' }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user