Essentially, I want to be able to handle \"wildcard filenames\" in Linux using ansible. In essence, this means using the ls command with part of a filename followed by an \
annoying.stdout_lines
is already a list.
From doc of stdout_lines
When stdout is returned, Ansible always provides a list of strings, each containing one item per line from the original output.
To assign the list to another variable do:
..
register: annoying
- set_fact:
varName: "{{annoying.stdout_lines}}"
# print first element on the list
- debug: msg="{{varName | first}}"