Simplify more

as we need to match only the beginning of the string
This commit is contained in:
Greg Dubicki 2022-07-10 10:14:30 +02:00
parent b4a84c41f9
commit 590df03eb0
1 changed files with 2 additions and 2 deletions

View File

@ -59,9 +59,9 @@
- name: Define postgresql_effective_log_dir, if postgresql_log_dir is absolute
set_fact:
postgresql_effective_log_dir: '{{ postgresql_log_dir }}'
when: postgresql_log_dir is regex("^/.*")
when: postgresql_log_dir is match("/")
- name: Define postgresql_effective_log_dir, if postgresql_log_dir is relative
set_fact:
postgresql_effective_log_dir: '{{ postgresql_data_dir }}/{{ postgresql_log_dir }}'
when: postgresql_log_dir is not regex("^/.*")
when: postgresql_log_dir is not match("/")