File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
automation/roles/pgbackrest/tasks Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change 4040 run_once : true
4141 ansible.builtin.set_fact :
4242 repo1_path : " {{ pgbackrest_server_conf['global'] | selectattr('option', 'equalto', 'repo1-path') | map(attribute='value') | list | first }}"
43- when :
44- - (pgbackrest_repo_type | default('posix')) | lower == 'posix'
45- - pgbackrest_delegate is not none
43+ when : (pgbackrest_repo_type | default('posix')) | lower == 'posix'
4644
4745 - name : " Make sure the {{ repo1_path | default('') }} directory exists"
4846 delegate_to : " {{ pgbackrest_delegate }}"
5351 owner : " {{ pgbackrest_repo_user }}"
5452 group : " {{ pgbackrest_repo_user }}"
5553 mode : " 0750"
56- when :
57- - pgbackrest_delegate is not none
58- - repo1_path | default('') | length > 0
54+ when : repo1_path | default('') | length > 0
5955
6056 - name : Create stanza "{{ pgbackrest_stanza | default('') }}"
6157 become : true
6763 changed_when :
6864 - stanza_create_result.rc == 0
6965 - stanza_create_result.stdout is not search("already exists")
70- when : pgbackrest_delegate is not none
7166 vars :
72- pgbackrest_delegate : " {{ (groups.get('pgbackrest') or [None])[0] }}"
67+ pgbackrest_delegate : " {{ (groups.get('pgbackrest') | default([]) | first) | default(inventory_hostname) }}"
7368 when :
7469 - pgbackrest_repo_host | default('') | length > 0
7570 - groups.get('pgbackrest', []) | length > 0
You can’t perform that action at this time.
0 commit comments