|
18 | 18 | file: |
19 | 19 | path: "{{ item.path }}" |
20 | 20 | state: absent |
21 | | - when: (item.path | basename) not in (haproxy_frontends | json_query('[*].name') | map('regex_replace', '(.*)', '\\1.cfg') | list) |
| 21 | + when: (item.path | basename) not in (haproxy_frontends | json_query('[*].name') | map('regex_replace', '(.+)', '\\1.cfg') | list) |
22 | 22 | with_items: "{{ directory_contents.files }}" |
23 | 23 |
|
24 | 24 | - name: 'Build up the frontends' |
|
46 | 46 | file: |
47 | 47 | path: "{{ item.path }}" |
48 | 48 | state: absent |
49 | | - when: (item.path | basename) not in (haproxy_backends | json_query('[*].name') | map('regex_replace', '(.*)', '\\1.cfg') | list) |
| 49 | + when: (item.path | basename) not in (haproxy_backends | json_query('[*].name') | map('regex_replace', '(.+)', '\\1.cfg') | list) |
50 | 50 | with_items: "{{ directory_contents.files }}" |
51 | 51 |
|
52 | 52 | - name: 'Build up the backends' |
|
74 | 74 | file: |
75 | 75 | path: "{{ item.path }}" |
76 | 76 | state: absent |
77 | | - when: (item.path | basename) not in (haproxy_listen | json_query('[*].name') | map('regex_replace', '(.*)', '\\1.cfg') | list) |
| 77 | + when: (item.path | basename) not in (haproxy_listen | json_query('[*].name') | map('regex_replace', '(.+)', '\\1.cfg') | list) |
78 | 78 | with_items: "{{ directory_contents.files }}" |
79 | 79 |
|
80 | 80 | - name: 'Build up the listen sections' |
|
100 | 100 | file: |
101 | 101 | path: "{{ item.path }}" |
102 | 102 | state: absent |
103 | | - when: (item.path | basename) not in (haproxy_userlists | json_query('[*].name') | map('regex_replace', '(.*)', '\\1.cfg') | list) |
| 103 | + when: (item.path | basename) not in (haproxy_userlists | json_query('[*].name') | map('regex_replace', '(.+)', '\\1.cfg') | list) |
104 | 104 | with_items: "{{ directory_contents.files }}" |
105 | 105 |
|
106 | 106 | - name: 'Build up the userlist sections' |
|
146 | 146 | file: |
147 | 147 | path: "{{ item.path }}" |
148 | 148 | state: absent |
149 | | - when: (item.path | basename) not in (haproxy_peers | json_query('[*].name') | map('regex_replace', '(.*)', '\\1.cfg') | list) |
| 149 | + when: (item.path | basename) not in (haproxy_peers | json_query('[*].name') | map('regex_replace', '(.+)', '\\1.cfg') | list) |
150 | 150 | with_items: "{{ directory_contents.files }}" |
151 | 151 |
|
152 | 152 | - name: 'Build up the peers' |
|
0 commit comments