fix(postgresql): ignore errors on first run in check mode, support overriding internal postgresql container username, fix container image name creation
This commit is contained in:
@ -54,7 +54,13 @@
|
||||
vars:
|
||||
postgresql_login_host: >-2
|
||||
{{
|
||||
(postgresql_config_unix_socket_directories | first)
|
||||
(
|
||||
(postgresql_deployment_method in ['docker'])
|
||||
| ternary(
|
||||
postgresql_unix_socket_path,
|
||||
(postgresql_config_unix_socket_directories | first)
|
||||
)
|
||||
)
|
||||
if postgresql_config_connect_socket else
|
||||
(postgresql_container_info.container.NetworkSettings.IPAddress)
|
||||
}}
|
||||
|
@ -51,12 +51,14 @@
|
||||
name: "{{ postgresql_systemd_tmpfile_socket_correction_unit_name }}.service"
|
||||
state: "{{ postgresql_container_state }}"
|
||||
when: ansible_facts['service_mgr'] == 'systemd'
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
||||
- name: Ensure systemd unit {{ postgresql_systemd_tmpfile_socket_correction_unit_name }} is {{ postgresql_container_state }}
|
||||
ansible.builtin.systemd:
|
||||
name: "{{ postgresql_systemd_tmpfile_socket_correction_unit_name }}.service"
|
||||
enabled: "{{ postgresql_state == 'present' }}"
|
||||
when: ansible_facts['service_mgr'] == 'systemd'
|
||||
ignore_errors: "{{ ansible_check_mode }}"
|
||||
|
||||
- name: Lookup {{ postgresql_data_path }}/global
|
||||
ansible.builtin.stat:
|
||||
|
Reference in New Issue
Block a user