# list files on a host # https://www.middlewareinventory.com/blog/run-ansible-playbook-locally/ --- - name: "02 - Playing with Ansible - list files on a system" hosts: all # hosts: localhost # connection: local tasks: - name: "just execute a ls -lrt command" shell: "ls -lrt" register: "output" - debug: var=output.stdout_lines ...