What i got from results.stdout_lines is [u’755’]. How do i get just the value 755? I wish to pass this value to another task later on. Maybe to set permission using this value for another file.
The long story is the debug module likes to print strings, it is not really a datastructure printer or anything. result.stdout_lines is of course a list in this case.
The best way to see what data is available remains to be “-v” on the ansible playbook run, and passing it to another task is then pretty straightforward.
You would most likely iterate across it with “with_items”.
debug: msg=Hi I’ve got an {{ item }}
with_items: results.stdout_lines.