1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

iiab_env_file -> {{ iiab_env_file }} or "{{ iiab_env_file }}"

This commit is contained in:
root 2018-10-15 06:41:58 -04:00
parent d9c73cc804
commit b973906dc3
18 changed files with 23 additions and 23 deletions

View file

@ -172,9 +172,9 @@
iiab_wan_iface: "none"
when: adapter_count.stdout|int >= "5" and device_gw == "none" and gui_wan_iface == "unset" and gui_static_wan is defined
- name: Record IIAB_WAN_DEVICE to /etc/iiab/iiab.env
- name: Record IIAB_WAN_DEVICE to {{ iiab_env_file }}
lineinfile:
dest: /etc/iiab/iiab.env
dest: "{{ iiab_env_file }}"
regexp: '^IIAB_WAN_DEVICE=*'
line: 'IIAB_WAN_DEVICE="{{ iiab_wan_iface }}"'
state: present
@ -182,9 +182,9 @@
tags:
- network
- name: Record IIAB_LAN_DEVICE to /etc/iiab/iiab.env
- name: Record IIAB_LAN_DEVICE to {{ iiab_env_file }}
lineinfile:
dest: /etc/iiab/iiab.env
dest: "{{ iiab_env_file }}"
regexp: '^IIAB_LAN_DEVICE=*'
line: 'IIAB_LAN_DEVICE="{{ iiab_lan_iface }}"'
state: present

View file

@ -1,5 +1,5 @@
- name: iiab_wan_device
shell: grep IIAB_WAN_DEVICE /etc/iiab/iiab.env | awk -F "=" '{print $2}'
shell: grep IIAB_WAN_DEVICE {{ iiab_env_file }} | awk -F "=" '{print $2}'
when: iiab_stage|int > 4
register: prior_gw

View file

@ -79,7 +79,7 @@
- name: Create xs_httpcache flag
lineinfile:
dest: /etc/iiab/iiab.env
dest: "{{ iiab_env_file }}"
regexp: '^HTTPCACHE_ON=*'
line: 'HTTPCACHE_ON=True'
state: present
@ -121,7 +121,7 @@
- name: Remove xs_httpcache flag
lineinfile:
dest: /etc/iiab/iiab.env
dest: "{{ iiab_env_file }}"
regexp: '^HTTPCACHE_ON=*'
line: 'HTTPCACHE_ON=False'
state: present

View file

@ -55,9 +55,9 @@
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
- name: Record HOSTAPD_ENABLED to {{ iiab_env_file }}
lineinfile:
dest: /etc/iiab/iiab.env
dest: "{{ iiab_env_file }}"
regexp: '^HOSTAPD_ENABLED=*'
line: 'HOSTAPD_ENABLED={{ hostapd_enabled }}'
state: present

View file

@ -11,7 +11,7 @@
no_net_restart: True # used below in (1) sysd-netd-debian.yml,
# (2) debian.yml, (3) rpi_debian.yml
when: discovered_wireless_iface == iiab_wan_iface and not reboot_to_AP
# EITHER WAY: hostapd_enabled's state is RECORDED into /etc/iiab/iiab.env
# EITHER WAY: hostapd_enabled's state is RECORDED into {{ iiab_env_file }}
# in hostapd.yml for later use by...
# /usr/libexec/iiab-startup.sh, iiab-hotspot-off & iiab-hotspot-on
#

View file

@ -1,5 +1,5 @@
#!/bin/bash -x
source /etc/iiab/iiab.env
source {{ iiab_env_file }}
{% if is_debuntu %}
IPTABLES=/sbin/iptables
IPTABLES_DATA=/etc/iptables.up.rules

View file

@ -16,4 +16,4 @@ if grep -qi raspbian /etc/*release; then
ip link set dev wlan0 promisc on
fi
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" /etc/iiab/iiab.env
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=False/" {{ iiab_env_file }}

View file

@ -17,6 +17,6 @@ if grep -qi raspbian /etc/*release; then
ip link set dev wlan0 promisc off
fi
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" /etc/iiab/iiab.env
sed -i -e "s/^HOSTAPD_ENABLED.*/HOSTAPD_ENABLED=True/" {{ iiab_env_file }}
echo -e "\nPlease consider rebooting now.\n"