diff options
author | Matt Clay <matt@mystile.com> | 2016-09-15 16:07:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-15 16:07:55 -0700 |
commit | 355b29573c3e8d0acae067e932b1abb02a17ccf0 (patch) | |
tree | e0b49174f11007b6b30ef1f6b82b2a2dd5904264 /test/integration | |
parent | c17a3bac37e8df108a5194570f7532de6bb0070e (diff) | |
download | ansible-355b29573c3e8d0acae067e932b1abb02a17ccf0.tar.gz |
Use default on undefined vars in tests. (#17601)
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/roles/test_conditionals/tasks/main.yml | 2 | ||||
-rw-r--r-- | test/integration/vars_file.yml | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/test/integration/roles/test_conditionals/tasks/main.yml b/test/integration/roles/test_conditionals/tasks/main.yml index abe7bd24ac..0908b910fb 100644 --- a/test/integration/roles/test_conditionals/tasks/main.yml +++ b/test/integration/roles/test_conditionals/tasks/main.yml @@ -281,7 +281,7 @@ - block: - name: test a with_items loop using a variable with a missing attribute debug: var=item - with_items: "{{cond_bad_attribute.results}}" + with_items: "{{cond_bad_attribute.results | default('')}}" register: result - set_fact: skipped_bad_attribute=False - name: assert the task was skipped diff --git a/test/integration/vars_file.yml b/test/integration/vars_file.yml index c43bf81866..971e16a7a0 100644 --- a/test/integration/vars_file.yml +++ b/test/integration/vars_file.yml @@ -8,5 +8,5 @@ things1: - 2 things2: - "{{ foo }}" - - "{{ foob }}" + - "{{ foob | default('') }}" vars_file_var: 321 |