Skip to main content
added 6 characters in body
Source Link
Marcin Orlowski
  • 75.7k
  • 11
  • 128
  • 152

try the below command, it should work

- shell: ls -1 /some/dir register: contents - file: path=/some/dir/{{ item }} state=absent with_items: {{ contents.stdout_lines }} 

try the below command, it should work

- shell: ls -1 /some/dir register: contents - file: path=/some/dir/{{ item }} state=absent with_items: contents.stdout_lines 

try the below command, it should work

- shell: ls -1 /some/dir register: contents - file: path=/some/dir/{{ item }} state=absent with_items: {{ contents.stdout_lines }} 
Source Link

try the below command, it should work

- shell: ls -1 /some/dir register: contents - file: path=/some/dir/{{ item }} state=absent with_items: contents.stdout_lines