shell: "ping -c 1 {{item}} | grep icmp_seq | gawk -F'[()]' '{print $2}'"with_inventory_hostnames: test2register: testipdebug: "msg={{ item.stdout }}"with_items: "{{ testip.results }}"
显示全部- shell: "ping -c 1 {{item}} | grep icmp_seq | gawk -F'[()]' '{print $2}'"
with_inventory_hostnames: test2
register: testip
- debug: "msg={{ item.stdout }}"
with_items: "{{ testip.results }}"
收起