From 670746fe8840dd2e51c2b753506c075bf4dc9ec5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 29 Apr 2021 16:08:31 -0400 Subject: [PATCH] WIP: iiab.ini vars set in 3 places? For Squid, DansGuardian, Wondershaper --- roles/network/tasks/computed_services.yml | 58 +++++++++++++---------- roles/network/tasks/enable_services.yml | 13 +++-- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/roles/network/tasks/computed_services.yml b/roles/network/tasks/computed_services.yml index 26523cd1c..6fa8e42c0 100644 --- a/roles/network/tasks/computed_services.yml +++ b/roles/network/tasks/computed_services.yml @@ -57,29 +57,35 @@ option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - - option: dansguardian_enabled - value: "{{ dansguardian_enabled }}" - - option: squid_enabled - value: "{{ squid_enabled }}" - - option: wondershaper_enabled - value: "{{ wondershaper_enabled }}" - - option: iiab_network_mode_applied - value: "{{ iiab_network_mode }}" - - option: dhcpd_enabled - value: "{{ dhcpd_enabled }}" - - option: dhcp_service2 - value: "{{ dhcp_service2 }}" - - option: named_enabled - value: "{{ named_enabled }}" - - option: dnsmasq_enabled - value: "{{ dnsmasq_enabled }}" - - option: no_net_restart - value: "{{ no_net_restart }}" - - option: hostapd_enabled - value: "{{ hostapd_enabled }}" - - option: host_ssid - value: "{{ host_ssid }}" - - option: host_wifi_mode - value: "{{ host_wifi_mode }}" - - option: host_channel - value: "{{ host_channel }}" + #- option: dansguardian_install + # value: "{{ dansguardian_install }}" + #- option: dansguardian_enabled + # value: "{{ dansguardian_enabled }}" + #- option: squid_install + # value: "{{ squid_install }}" + #- option: squid_enabled + # value: "{{ squid_enabled }}" + #- option: wondershaper_install + # value: "{{ wondershaper_install }}" + #- option: wondershaper_enabled + # value: "{{ wondershaper_enabled }}" + - option: iiab_network_mode_applied + value: "{{ iiab_network_mode }}" + - option: dhcpd_enabled + value: "{{ dhcpd_enabled }}" + - option: dhcp_service2 + value: "{{ dhcp_service2 }}" + - option: named_enabled + value: "{{ named_enabled }}" + - option: dnsmasq_enabled + value: "{{ dnsmasq_enabled }}" + - option: no_net_restart + value: "{{ no_net_restart }}" + - option: hostapd_enabled + value: "{{ hostapd_enabled }}" + - option: host_ssid + value: "{{ host_ssid }}" + - option: host_wifi_mode + value: "{{ host_wifi_mode }}" + - option: host_channel + value: "{{ host_channel }}" diff --git a/roles/network/tasks/enable_services.yml b/roles/network/tasks/enable_services.yml index f6a1ac116..59a55ab8a 100644 --- a/roles/network/tasks/enable_services.yml +++ b/roles/network/tasks/enable_services.yml @@ -216,6 +216,7 @@ - gateway/iiab-internet-on - gateway/iiab-internet-off + - name: Add 'squid' variable values to {{ iiab_ini_file }} ini_file: path: "{{ iiab_ini_file }}" @@ -223,7 +224,9 @@ option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - - option: enabled + - option: squid_install + value: "{{ squid_install }}" + - option: squid_enabled value: "{{ squid_enabled }}" - name: Add 'dansguardian' variable values to {{ iiab_ini_file }} @@ -233,7 +236,9 @@ option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - - option: enabled + - option: dansguardian_install + value: "{{ dansguardian_install }}" + - option: dansguardian_enabled value: "{{ dansguardian_enabled }}" - name: Add 'wondershaper' variable values to {{ iiab_ini_file }} @@ -243,5 +248,7 @@ option: "{{ item.option }}" value: "{{ item.value | string }}" with_items: - - option: enabled + - option: wondershaper_install + value: "{{ wondershaper_install }}" + - option: wondershaper_enabled value: "{{ wondershaper_enabled }}"