Fix the postgresql data dir path.
This commit is contained in:
parent
b753d89276
commit
0e3d7f4d9c
|
@ -18,7 +18,7 @@
|
||||||
- pgpool_recovery_user_pwd is defined
|
- pgpool_recovery_user_pwd is defined
|
||||||
|
|
||||||
- name: Give access to the pgpool recovery user, if it is not postgres
|
- name: Give access to the pgpool recovery user, if it is not postgres
|
||||||
lineinfile: name=/etc/postgresql/{{ psql_version }}/main/pg_hba.conf regexp="^host {{ item.0.name }} {{ pgpool_recovery_user }} {{ item.1 }}.*$" line="host {{ item.0.name }} {{ pgpool_recovery_user }} {{ item.1 }} md5"
|
lineinfile: name={{ psql_conf_dir }}/pg_hba.conf regexp="^host {{ item.0.name }} {{ pgpool_recovery_user }} {{ item.1 }}.*$" line="host {{ item.0.name }} {{ pgpool_recovery_user }} {{ item.1 }} md5"
|
||||||
with_subelements:
|
with_subelements:
|
||||||
- '{{ psql_db_data | default([]) }}'
|
- '{{ psql_db_data | default([]) }}'
|
||||||
- allowed_hosts
|
- allowed_hosts
|
||||||
|
@ -38,13 +38,13 @@
|
||||||
user: user={{ pgpool_recovery_user }} generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa ssh_key_type=rsa
|
user: user={{ pgpool_recovery_user }} generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa ssh_key_type=rsa
|
||||||
|
|
||||||
- name: Install the pgpool recovery and remote restart scripts. They assume that the postgresql hosts can talk to each other
|
- name: Install the pgpool recovery and remote restart scripts. They assume that the postgresql hosts can talk to each other
|
||||||
template: src={{ item.1 }}.j2 dest={{ item.0.backend_data_directory }}/main/{{ item.1 }} owner=postgres group=postgres mode=0500
|
template: src={{ item.1 }}.j2 dest={{ item.0.backend_data_directory }}/{{ item.1 }} owner=postgres group=postgres mode=0500
|
||||||
with_nested:
|
with_nested:
|
||||||
- '{{ pgpool_backends | default([]) }}'
|
- '{{ pgpool_backends | default([]) }}'
|
||||||
- [ '{{ pgpool_recovery_stage1_script }}', '{{ pgpool_recovery_stage2_script }}', '{{ pgpool_remote_start_script }}' ]
|
- [ '{{ pgpool_recovery_stage1_script }}', '{{ pgpool_recovery_stage2_script }}', '{{ pgpool_remote_start_script }}' ]
|
||||||
|
|
||||||
- name: Set the postgresql configuration parameters needed by pgpool
|
- name: Set the postgresql configuration parameters needed by pgpool
|
||||||
action: configfile path=/etc/postgresql/{{ psql_version }}/main/postgresql.conf key={{ item.name }} value="{{ item.value }}"
|
action: configfile path={{ psql_conf_dir }}/postgresql.conf key={{ item.name }} value="{{ item.value }}"
|
||||||
with_items: '{{ psql_wal_files_conf }}'
|
with_items: '{{ psql_wal_files_conf }}'
|
||||||
when:
|
when:
|
||||||
- item.set
|
- item.set
|
||||||
|
|
Loading…
Reference in New Issue