Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ansible-playbook test.yml -e "int1=ens33 int2=lo0"
- ---
- - hosts: localhost
- tasks:
- - name: "Get NIC Model for {{ item }}"
- shell: "lshw -class network -short | grep {{ item }} | awk '{ print $4 }'"
- register: "{{ item }}-details"
- with_items:
- - "{{ int1 }}"
- - "{{ int2 }}"
- - debug: msg="{{ {{ item }}-details.stdout }}"
- with_items:
- - "{{ int1 }}"
- - "{{ int2 }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement