1
0
Fork 0
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:
Jerry Vonau 2020-03-24 21:41:20 -05:00
parent eebd14581e
commit bf5dc8cf15

View file

@ -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