for a bigger project we are interfacing ansible with python using the python api.
however I am not able to run the debug module using a with_items loop. the purpose is to find/report and delete the files found on remote systems. play_source = dict( name="Ansible Play", hosts='all', gather_facts='no', vars=dict(sudo_content=sudoers_content), tasks=[ dict(action=dict(module='find', file_type='file', paths = '/etc', age= '14d', use_regex = 'True', patterns='sudoers(?=\\.).*'), register='output'), dict(action=dict(module='debug', args=dict(msg='{{ item.path}}'), with_items='{{ output.files}}')) ] ) this executes fine the files are found but the debug task fails due to item variable is undefined. fatal: [vm]: FAILED! => msg: 'The task includes an option with an undefined variable. The error was: ''item'' is undefined' how can i make the loop work? thanks -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-devel/68ecf91f-364b-44b1-9f82-4a070fb9fef9n%40googlegroups.com.