playground/ansible-playbooks/ls-on-all.yml

18 lines
305 B
YAML

- hosts: all
remote_user: hyung-hwan
tasks:
- name: run ls
shell: ls -laF /etc
register: out
# - name: print result
# debug:
# msg: "xxx: {{ out.stdout }}"
- name: print result
debug:
msg: "xxx: {{ item }}"
loop: "{{ out.stdout_lines }}"