ansible-files/list.yaml

11 lines
247 B
YAML

- name: List contents of /etc directory
hosts: all
become: yes
tasks:
- name: List contents of /etc directory
command: ls -la /etc
register: ls_output
- name: Print output
debug:
var: ls_output.stdout_lines