|
|
@ -111,9 +111,21 @@
|
|
|
|
- name: confirm pipe lookup works with a single positional arg
|
|
|
|
- name: confirm pipe lookup works with a single positional arg
|
|
|
|
debug: msg="{{ lookup('pipe', 'ls') }}"
|
|
|
|
debug: msg="{{ lookup('pipe', 'ls') }}"
|
|
|
|
|
|
|
|
|
|
|
|
# https://github.com/ansible/ansible/issues/6550
|
|
|
|
|
|
|
|
- name: confirm pipe lookup works with multiple positional args
|
|
|
|
|
|
|
|
debug: msg="{{ lookup('pipe', 'ls -l /tmp') }}"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# LOOKUP TEMPLATING
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: use bare interpolation
|
|
|
|
|
|
|
|
debug: msg="got {{item}}"
|
|
|
|
|
|
|
|
with_items: things1
|
|
|
|
|
|
|
|
register: bare_var
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: verify that list was interpolated
|
|
|
|
|
|
|
|
assert:
|
|
|
|
|
|
|
|
that:
|
|
|
|
|
|
|
|
- "bare_var.results[0].item == 1"
|
|
|
|
|
|
|
|
- "bare_var.results[1].item == 2"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: use list with undefined var in it
|
|
|
|
|
|
|
|
debug: msg={{item}}
|
|
|
|
|
|
|
|
with_items: things2
|
|
|
|
|
|
|
|
|
|
|
|