Fix some booleans.
This commit is contained in:
parent
06dbe8d595
commit
3f63d00c87
|
@ -7,10 +7,10 @@
|
||||||
- '{{ psql_db_data | default([]) }}'
|
- '{{ psql_db_data | default([]) }}'
|
||||||
- allowed_hosts
|
- allowed_hosts
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
- psql_db_data is defined
|
- psql_db_data is defined
|
||||||
- item.1 is defined
|
- item.1 is defined
|
||||||
- not psql_force_ssl_client_connection | bool
|
- not psql_force_ssl_client_connection
|
||||||
notify: Reload postgresql
|
notify: Reload postgresql
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||||
|
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
- '{{ psql_db_data | default([]) }}'
|
- '{{ psql_db_data | default([]) }}'
|
||||||
- allowed_hosts
|
- allowed_hosts
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
- psql_db_data is defined
|
- psql_db_data is defined
|
||||||
- item.1 is defined
|
- item.1 is defined
|
||||||
- psql_force_ssl_client_connection | bool
|
- psql_force_ssl_client_connection
|
||||||
notify: Reload postgresql
|
notify: Reload postgresql
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||||
|
|
||||||
|
@ -42,14 +42,14 @@
|
||||||
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: If postgresql is only accessed from localhost make it listen only on the localhost interface
|
- name: If postgresql is only accessed from localhost make it listen only on the localhost interface
|
||||||
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=listen_addresses value="'localhost'"
|
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=listen_addresses value="'localhost'"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- not psql_listen_on_ext_int | bool
|
- not psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: Log the connections
|
- name: Log the connections
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: Set the correct permissions to the postgresql files
|
- name: Set the correct permissions to the postgresql files
|
||||||
|
@ -92,8 +92,8 @@
|
||||||
- name: Open the postgresql service to a specific zone.
|
- name: Open the postgresql service to a specific zone.
|
||||||
firewalld: service=postgresql zone={{ postgresql_firewalld_zone }} permanent=True state=enabled immediate=True
|
firewalld: service=postgresql zone={{ postgresql_firewalld_zone }} permanent=True state=enabled immediate=True
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
- firewalld_enabled | bool
|
- firewalld_enabled
|
||||||
|
|
||||||
- name: Give access to the remote postgresql client
|
- name: Give access to the remote postgresql client
|
||||||
lineinfile: name={{ psql_el_conf_dir }}/pg_hba.conf regexp="^host.* {{ item.0.name }} {{ item.0.user }} {{ item.1 }}.*$" line="host {{ item.0.name }} {{ item.0.user }} {{ item.1 }} md5"
|
lineinfile: name={{ psql_el_conf_dir }}/pg_hba.conf regexp="^host.* {{ item.0.name }} {{ item.0.user }} {{ item.1 }}.*$" line="host {{ item.0.name }} {{ item.0.user }} {{ item.1 }} md5"
|
||||||
|
@ -101,10 +101,10 @@
|
||||||
- '{{ psql_db_data | default([]) }}'
|
- '{{ psql_db_data | default([]) }}'
|
||||||
- allowed_hosts
|
- allowed_hosts
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
- psql_db_data is defined
|
- psql_db_data is defined
|
||||||
- item.1 is defined
|
- item.1 is defined
|
||||||
- not psql_force_ssl_client_connection | bool
|
- not psql_force_ssl_client_connection
|
||||||
notify: Reload postgresql
|
notify: Reload postgresql
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@
|
||||||
- '{{ psql_db_data | default([]) }}'
|
- '{{ psql_db_data | default([]) }}'
|
||||||
- allowed_hosts
|
- allowed_hosts
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
- psql_db_data is defined
|
- psql_db_data is defined
|
||||||
- item.1 is defined
|
- item.1 is defined
|
||||||
- psql_force_ssl_client_connection | bool
|
- psql_force_ssl_client_connection
|
||||||
notify: Reload postgresql
|
notify: Reload postgresql
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||||
|
|
||||||
|
@ -141,14 +141,14 @@
|
||||||
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: If postgresql is only accessed from localhost make it listen only on the localhost interface
|
- name: If postgresql is only accessed from localhost make it listen only on the localhost interface
|
||||||
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=listen_addresses value="'localhost'"
|
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=listen_addresses value="'localhost'"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- not psql_listen_on_ext_int | bool
|
- not psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: Log the connections
|
- name: Log the connections
|
||||||
|
@ -167,7 +167,7 @@
|
||||||
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
||||||
register: restart_postgresql
|
register: restart_postgresql
|
||||||
when:
|
when:
|
||||||
- psql_listen_on_ext_int | bool
|
- psql_listen_on_ext_int
|
||||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||||
|
|
||||||
- name: Set the correct permissions to the postgresql files
|
- name: Set the correct permissions to the postgresql files
|
||||||
|
|
Loading…
Reference in New Issue