Fix some booleans.
This commit is contained in:
parent
06dbe8d595
commit
3f63d00c87
|
@ -7,10 +7,10 @@
|
|||
- '{{ psql_db_data | default([]) }}'
|
||||
- allowed_hosts
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
- psql_db_data is defined
|
||||
- item.1 is defined
|
||||
- not psql_force_ssl_client_connection | bool
|
||||
- not psql_force_ssl_client_connection
|
||||
notify: Reload postgresql
|
||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||
|
||||
|
@ -20,10 +20,10 @@
|
|||
- '{{ psql_db_data | default([]) }}'
|
||||
- allowed_hosts
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
- psql_db_data is defined
|
||||
- item.1 is defined
|
||||
- psql_force_ssl_client_connection | bool
|
||||
- psql_force_ssl_client_connection
|
||||
notify: Reload postgresql
|
||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||
|
||||
|
@ -42,14 +42,14 @@
|
|||
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- 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'"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- not psql_listen_on_ext_int | bool
|
||||
- not psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- name: Log the connections
|
||||
|
@ -68,7 +68,7 @@
|
|||
action: configfile path={{ psql_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- name: Set the correct permissions to the postgresql files
|
||||
|
@ -92,8 +92,8 @@
|
|||
- name: Open the postgresql service to a specific zone.
|
||||
firewalld: service=postgresql zone={{ postgresql_firewalld_zone }} permanent=True state=enabled immediate=True
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- firewalld_enabled | bool
|
||||
- psql_listen_on_ext_int
|
||||
- firewalld_enabled
|
||||
|
||||
- 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"
|
||||
|
@ -101,10 +101,10 @@
|
|||
- '{{ psql_db_data | default([]) }}'
|
||||
- allowed_hosts
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
- psql_db_data is defined
|
||||
- item.1 is defined
|
||||
- not psql_force_ssl_client_connection | bool
|
||||
- not psql_force_ssl_client_connection
|
||||
notify: Reload postgresql
|
||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||
|
||||
|
@ -114,10 +114,10 @@
|
|||
- '{{ psql_db_data | default([]) }}'
|
||||
- allowed_hosts
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
- psql_db_data is defined
|
||||
- item.1 is defined
|
||||
- psql_force_ssl_client_connection | bool
|
||||
- psql_force_ssl_client_connection
|
||||
notify: Reload postgresql
|
||||
tags: [ 'postgresql', 'postgres', 'pg_hba', 'pg_db' ]
|
||||
|
||||
|
@ -141,14 +141,14 @@
|
|||
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=listen_addresses value="'*'"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- 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'"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- not psql_listen_on_ext_int | bool
|
||||
- not psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- name: Log the connections
|
||||
|
@ -167,7 +167,7 @@
|
|||
action: configfile path={{ psql_el_conf_dir }}/postgresql.conf key=log_hostname value="on"
|
||||
register: restart_postgresql
|
||||
when:
|
||||
- psql_listen_on_ext_int | bool
|
||||
- psql_listen_on_ext_int
|
||||
tags: [ 'postgresql', 'postgres', 'pg_conf' ]
|
||||
|
||||
- name: Set the correct permissions to the postgresql files
|
||||
|
|
Loading…
Reference in New Issue