hosts: webservers
tasks:
- name: Execute 'ls' command and capture output
ansible.builtin.shell: |
cd /tmp
pwd
ls -l
[file-name 000020_2025-02-17_08-09-10.txt]
hosts: webservers
tasks:
ansible.builtin.shell: |
cd /tmp
pwd
ls -l
[file-name 000020_2025-02-17_08-09-10.txt]