From 5a0a37d064eb0e2cf76e788d5919d1f833e235be Mon Sep 17 00:00:00 2001 From: Jerry Vonau Date: Sun, 8 Apr 2018 19:46:31 -0500 Subject: [PATCH] scripts only apply to the RPi --- roles/network/tasks/hostapd.yml | 9 +++++++++ roles/network/tasks/main.yml | 10 ---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/roles/network/tasks/hostapd.yml b/roles/network/tasks/hostapd.yml index 1b165f4ff..f27e60470 100644 --- a/roles/network/tasks/hostapd.yml +++ b/roles/network/tasks/hostapd.yml @@ -31,6 +31,7 @@ owner: root group: root mode: 0755 + when: is_rpi - name: Create /usr/bin/iiab-hotspot-off from template template: @@ -39,6 +40,7 @@ owner: root group: root mode: 0755 + when: is_rpi - name: Disable the Access Point 'hostapd' service systemd: @@ -52,3 +54,10 @@ name: hostapd enabled: yes when: hostapd_enabled and iiab_wireless_lan_iface is defined and iiab_network_mode != "Appliance" + +- name: Record HOSTAPD_ENABLED to /etc/iiab/iiab.env + lineinfile: + dest: /etc/iiab/iiab.env + regexp: '^HOSTAPD_ENABLED=*' + line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}' + state: present diff --git a/roles/network/tasks/main.yml b/roles/network/tasks/main.yml index cc595770b..2c36298a3 100644 --- a/roles/network/tasks/main.yml +++ b/roles/network/tasks/main.yml @@ -19,16 +19,6 @@ # be encapsulated into roles/network/tasks/hostapd.yml in future? Whereas # today "./runtags hostapd" doesn't exist & "./runtags AP" is UNSUPPORTED! -- name: Record HOSTAPD_ENABLED to /etc/iiab/iiab.env - lineinfile: - dest: /etc/iiab/iiab.env - regexp: '^HOSTAPD_ENABLED=*' - line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}' - state: present - #when: not installing #REMOVE THIS LINE IF installing IS ALWAYS false AS SET IN roles/0-init/defaults/main.yml - tags: - - network - #- name: RPi - reboot to AP post install - installed via wifi so the services are ready # set_fact: # iiab_lan_iface: br0