From 533b5926a2693f8d87ad51d94bd20a10f92312d7 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Sun, 2 Sep 2018 14:07:37 +0200 Subject: [PATCH] Replace select filter with a more portable thing --- test/integration/targets/loop-until/tasks/main.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/integration/targets/loop-until/tasks/main.yml b/test/integration/targets/loop-until/tasks/main.yml index 447d5b00c63c0f..bb3799a30f5733 100644 --- a/test/integration/targets/loop-until/tasks/main.yml +++ b/test/integration/targets/loop-until/tasks/main.yml @@ -22,14 +22,18 @@ - set_fact: "until_tempfile_path_{{ idx }}": "{{ tmp_file.stdout }}" + until_tempfile_path_var_names: > + {{ [ 'until_tempfile_path_' + idx | string ] + until_tempfile_path_var_names | default([]) }} loop: "{{ tempfilepaths.results }}" loop_control: index_var: idx loop_var: tmp_file -- set_fact: - until_tempfile_path_var_names: > - {{ vars | select('match', '^until_tempfile_path_') | list }} +# `select` filter is only available since Jinja 2.7, +# thus tests are failing under CentOS in CI +#- set_fact: +# until_tempfile_path_var_names: > +# {{ vars | select('match', '^until_tempfile_path_') | list }} - name: loop and until with 6 retries shell: echo "run" >> {{ lookup('vars', tmp_file_var) }} && wc -w < {{ lookup('vars', tmp_file_var) }} | tr -d ' '