1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-12 19:22:24 +00:00

network guard against faulty user edits to local_vars

This commit is contained in:
Jerry Vonau 2019-10-16 11:06:02 -05:00
parent 36defde4ae
commit 2423d9a293
4 changed files with 15 additions and 8 deletions

View file

@ -2,7 +2,7 @@
service:
name: dhcpd
enabled: no
when: dhcpd_install and not dhcpd_enabled
when: (dhcpd_install or dhcpd_installed is defined) and not dhcpd_enabled
# service is restarted with NM dispatcher.d script
- name: Enable dhcpd service
@ -46,7 +46,7 @@
systemd:
name: "{{ dns_service }}"
enabled: no
when: named_install and not named_enabled
when: (named_install or named_installed is defined) and not named_enabled
- name: Install /etc/dnsmasq.d/iiab.conf from template, when dnsmasq_enabled and isn't Appliance
template:
@ -122,7 +122,7 @@
systemd:
name: dansguardian
enabled: no
when: dansguardian_install and not dansguardian_enabled
when: (dansguardian_install or dansguardian_installed is defined) and not dansguardian_enabled
- name: Mandate 'HTTPCACHE_ON=True' in {{ iiab_env_file }}, if squid_enabled
lineinfile:
@ -164,7 +164,7 @@
systemd:
name: "{{ proxy }}"
enabled: no
when: squid_install and not squid_enabled
when: (squid_install or squid_installed is defined) and not squid_enabled
- name: Revert to 'HTTPCACHE_ON=False' if not squid_enabled
lineinfile:
@ -184,7 +184,7 @@
systemd:
name: wondershaper
enabled: no
when: wondershaper_install and not wondershaper_enabled
when: (wondershaper_install or wondershaper_installed is defined) and not wondershaper_enabled
# check-LAN should be iptables.yml remove later
- name: Install clean copy of /usr/bin/iiab-gen-iptables from template

View file

@ -57,7 +57,7 @@
- name: Configure wondershaper
include_tasks: wondershaper.yml
when: wondershaper_install | bool
when: wondershaper_install | bool or wondershaper_installed is defined
tags:
- network
- wondershaper

View file

@ -15,13 +15,13 @@
name: "{{ proxy }}"
state: stopped
async: 120
when: squid_install | bool
when: squid_install | bool or squid_installed is defined
- name: Stop DansGuardian
systemd:
name: dansguardian
state: stopped
when: dansguardian_install | bool
when: dansguardian_install | bool or dansguardian_installed is defined
- name: Restart DansGuardian service (dansguardian) except Ubuntu which needs reboot to activate
systemd:

View file

@ -38,6 +38,13 @@
group: root
state: link
- name: Add 'wondershaper_installed' variable values to {{ iiab_installed }}
lineinfile:
dest: "{{ iiab_installed }}"
regexp: '^wondershaper_installed'
line: 'wondershaper_installed: True'
state: present
- name: Add 'wondershaper' variable values to {{ iiab_ini_file }}
ini_file:
dest: "{{ iiab_ini_file }}"