mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
generate random mac address for ap0
This commit is contained in:
parent
eebd14581e
commit
bf5dc8cf15
1 changed files with 8 additions and 0 deletions
|
@ -21,6 +21,14 @@
|
|||
mode: 0644
|
||||
when: discovered_wireless_iface != "none"
|
||||
|
||||
- name: Generate new random mac address for ap0
|
||||
shell: tr -dc A-F0-9 < /dev/urandom | head -c 10 | sed -r 's/(..)/\1:/g;s/:$//;s/^/02:/'
|
||||
register: ap0_mac
|
||||
|
||||
- name: Setting ap0 mac address for use in hostapd service file
|
||||
set_fact:
|
||||
ap0_mac_addr: "{{ ap0_mac.stdout }}"
|
||||
|
||||
- name: Use custom systemd unit file to start 'hostapd' service
|
||||
template:
|
||||
src: hostapd/hostapd.service.j2
|
||||
|
|
Loading…
Reference in a new issue