mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 19:22:24 +00:00
Merge pull request #3555 from jvonau/hotfix
iiab-clone-wifi needs template from hostapd - record wifi_up_down
This commit is contained in:
commit
57bf481315
4 changed files with 20 additions and 25 deletions
|
@ -100,6 +100,18 @@
|
|||
line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}'
|
||||
state: present
|
||||
|
||||
- name: Create /etc/hostapd/hostapd.conf and backup .iiab from template if needed
|
||||
template:
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { src: 'hostapd/hostapd.conf.j2', dest: '/etc/hostapd/hostapd.conf' }
|
||||
- { src: 'hostapd/hostapd.conf.j2', dest: '/etc/hostapd/hostapd.conf.iiab' }
|
||||
when: can_be_ap
|
||||
|
||||
- name: Record host_country_code_applied and host_channel in network of {{ iiab_ini_file }}
|
||||
ini_file:
|
||||
dest: "{{ iiab_ini_file }}" # /etc/iiab/iiab.ini
|
||||
|
@ -113,6 +125,8 @@
|
|||
value: "{{ host_ssid }}"
|
||||
- option: host_wifi_mode
|
||||
value: "{{ host_wifi_mode }}"
|
||||
- option: wifi_up_down
|
||||
value: "{{ wifi_up_down }}"
|
||||
- option: host_country_code_applied
|
||||
value: "{{ host_country_code }}"
|
||||
- option: host_channel
|
||||
|
|
|
@ -14,18 +14,6 @@
|
|||
- wpa_supplicant
|
||||
when: wifi_up_down and hostapd_enabled
|
||||
|
||||
- name: Create /etc/hostapd/hostapd.conf and backup .iiab from template if needed
|
||||
template:
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ item.dest }}"
|
||||
with_items:
|
||||
- { src: 'hostapd/hostapd.conf.j2', dest: '/etc/hostapd/hostapd.conf' }
|
||||
- { src: 'hostapd/hostapd.conf.j2', dest: '/etc/hostapd/hostapd.conf.iiab' }
|
||||
when: can_be_ap
|
||||
|
||||
- name: Enable & Restart networkd-dispatcher.service
|
||||
systemd:
|
||||
name: networkd-dispatcher
|
||||
|
@ -34,6 +22,12 @@
|
|||
masked: no
|
||||
when: systemd_networkd_active
|
||||
|
||||
- name: Clone wifi if needed
|
||||
systemd:
|
||||
name: iiab-clone-wifi
|
||||
state: restarted
|
||||
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
|
||||
|
||||
- name: Restart hostapd when WiFi is present but not when using WiFi as gateway with wifi_up_down False
|
||||
systemd:
|
||||
name: hostapd
|
||||
|
|
|
@ -78,12 +78,6 @@
|
|||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Clone wifi if needed
|
||||
systemd:
|
||||
name: iiab-clone-wifi
|
||||
state: restarted
|
||||
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
|
||||
|
||||
- name: Restart the networking service if appropriate
|
||||
systemd:
|
||||
name: networking
|
||||
|
|
|
@ -87,12 +87,6 @@
|
|||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
- name: Clone wifi if needed
|
||||
systemd:
|
||||
name: iiab-clone-wifi
|
||||
state: restarted
|
||||
when: wifi_up_down and can_be_ap and ansible_ap0 is undefined
|
||||
|
||||
- name: Enable & Restart systemd-networkd.service
|
||||
systemd:
|
||||
name: systemd-networkd
|
||||
|
@ -106,4 +100,3 @@
|
|||
state: restarted
|
||||
enabled: yes
|
||||
masked: no
|
||||
|
||||
|
|
Loading…
Reference in a new issue