mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
service touch-ups
This commit is contained in:
parent
37ed8a6ba4
commit
964a592679
1 changed files with 17 additions and 9 deletions
|
@ -39,19 +39,19 @@
|
||||||
set_fact:
|
set_fact:
|
||||||
ap0_mac_addr: "{{ ap0_mac.stdout }}"
|
ap0_mac_addr: "{{ ap0_mac.stdout }}"
|
||||||
|
|
||||||
- name: Use custom 'hostapd' systemd service unit file using ap0 when wifi_up_down
|
- name: Use custom 'hostapd' systemd service unit file using ap0
|
||||||
template:
|
template:
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { src: 'hostapd/hostapd.service.j2', dest: '/etc/systemd/system/hostapd.service' }
|
- { src: 'hostapd/hostapd.service.j2', dest: '/etc/systemd/system/hostapd.service', mode: '0644' }
|
||||||
- { src: 'hostapd/clone-wifi.service.j2', dest: '/etc/systemd/system/clone-wifi.service' }
|
- { src: 'hostapd/clone-wifi.service.j2', dest: '/etc/systemd/system/clone-wifi.service', mode: '0644' }
|
||||||
- { src: 'hostapd/wifi-test.service.j2', dest: '/etc/systemd/system/wifi-test.service' }
|
- { src: 'hostapd/wifi-test.service.j2', dest: '/etc/systemd/system/wifi-test.service', mode: '0644'}
|
||||||
- { src: 'hostapd/test-wifi', dest: '/sbin/test-wifi' }
|
- { src: 'hostapd/test-wifi', dest: '/sbin/test-wifi', mode: '0755' }
|
||||||
when: discovered_wireless_iface != "none" and wifi_up_down
|
when: discovered_wireless_iface != "none"
|
||||||
|
|
||||||
- name: Use custom 'hostapd' systemd service unit file for {{ discovered_wireless_iface }} when not wifi_up_down
|
- name: Use custom 'hostapd' systemd service unit file for {{ discovered_wireless_iface }} when not wifi_up_down
|
||||||
template:
|
template:
|
||||||
|
@ -138,10 +138,18 @@
|
||||||
enabled: yes
|
enabled: yes
|
||||||
when: hostapd_enabled and not wifi_up_down
|
when: hostapd_enabled and not wifi_up_down
|
||||||
|
|
||||||
- name: Enable the Access Point 'hostapd' service
|
- name: Disable ap0 related services
|
||||||
|
systemd:
|
||||||
|
name: "{{ item }}"
|
||||||
|
enabled: no
|
||||||
|
with_items:
|
||||||
|
- clone-wifi.service
|
||||||
|
- wifi-test.service
|
||||||
|
when: not wifi_up_down
|
||||||
|
|
||||||
|
- name: Enable the Access Point 'hostapd' and ap0 related services
|
||||||
systemd:
|
systemd:
|
||||||
name: "{{ item }}"
|
name: "{{ item }}"
|
||||||
masked: no
|
|
||||||
enabled: yes
|
enabled: yes
|
||||||
with_items:
|
with_items:
|
||||||
- hostapd.service
|
- hostapd.service
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue