Skip to content

Commit 0c7045a

Browse files
committed
fix: tests/registrations.yaml: Simplify pattern to match
It was messing with the jinja2 templates.
1 parent 125d6f6 commit 0c7045a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

playbooks/tests/registrations.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -199,22 +199,22 @@
199199

200200
- name: "Try to re-register failed hosts (if needed)"
201201
ansible.builtin.shell: |
202-
cp -p {{ clients_yaml_cmd_log }} {{ clients_yaml_cmd_retries_log }}
202+
cp -p "{{ clients_yaml_cmd_log }}" "{{ clients_yaml_cmd_retries_log }}"
203203
204-
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ {{ clients_yaml_cmd_retries_log }})" != 0 )); do
205-
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ {{ clients_yaml_cmd_retries_log }})
206-
iter_clients_yaml_cmd_retries_log={{ clients_yaml_cmd_retries_log }}.${num_fails}
204+
while (( "$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' {{ clients_yaml_cmd_retries_log }})" != 0 )); do
205+
num_fails=$(grep -c -e ^'fatal: ' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' {{ clients_yaml_cmd_retries_log }})
206+
iter_clients_yaml_cmd_retries_log="{{ clients_yaml_cmd_retries_log }}.${num_fails}"
207207
208-
cp -p {{ clients_yaml_cmd_retries_log }} $iter_clients_yaml_cmd_retries_log
208+
cp -p "{{ clients_yaml_cmd_retries_log }}" $iter_clients_yaml_cmd_retries_log
209209
210210
unset CLIENT_IP_LIST
211211
212212
for client_ip in $(awk '/^fatal: / {print $2}' $iter_clients_yaml_cmd_retries_log | cut -d'[' -f2 | cut -d']' -f1); do
213213
CLIENT_IP_LIST+="$client_ip,"
214214
done
215215
216-
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ $iter_clients_yaml_cmd_retries_log |
217-
uniq | grep -B1 -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed",'$ |
216+
for client_ip in $(grep -e ^'ok:' -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' $iter_clients_yaml_cmd_retries_log |
217+
uniq | grep -B1 -e ^' "Traceback ' -e ^' "curl: ' -e ' initial configuration failed' |
218218
awk -F'[' '/ok:/ {print $2}' | cut -d']' -f1); do
219219
CLIENT_IP_LIST+="$client_ip,"
220220
done

0 commit comments

Comments
 (0)