mirror of
https://github.com/ruanbekker/rpi-ansible.git
synced 2025-04-20 09:11:45 +02:00
always look at on-board mac addr, not any usb wifi dongles
This commit is contained in:
parent
d144bb1017
commit
b7a649dd87
@ -7,14 +7,14 @@
|
||||
# Basic hostname setup
|
||||
- name: Get MAC address
|
||||
debug:
|
||||
msg: "{{ hostvars[inventory_hostname].ansible_default_ipv4.macaddress }}"
|
||||
msg: "{{ hostvars[inventory_hostname].ansible_eth0.macaddress }}"
|
||||
tags:
|
||||
- raspi
|
||||
- sw
|
||||
|
||||
- name: store MAC address
|
||||
set_fact:
|
||||
my_macaddr: "{{ hostvars[inventory_hostname].ansible_default_ipv4.macaddress }}"
|
||||
my_macaddr: "{{ hostvars[inventory_hostname].ansible_eth0.macaddress }}"
|
||||
tags:
|
||||
- raspi
|
||||
- sw
|
||||
|
Loading…
x
Reference in New Issue
Block a user