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

Remove "| bool" 1.5yrs later, as Ansible 2.10 changed conditional_bare_variables default

This commit is contained in:
root 2020-10-16 16:46:19 -04:00
parent 2968a8a20e
commit ca171fbc1c
158 changed files with 2072 additions and 2072 deletions

View file

@ -3,7 +3,7 @@
name: avahi
createhome: no
shell: /bin/false
when: is_debuntu | bool
when: is_debuntu
- name: Install avahi announce config file /etc/avahi/services/schoolserver.service
template:
@ -37,7 +37,7 @@
copy:
src: /usr/share/doc/avahi-daemon/examples/ssh.service
dest: /etc/avahi/services/
when: is_debuntu | bool
when: is_debuntu
- name: Set ssh port for avahi
lineinfile:

View file

@ -19,7 +19,7 @@
owner: dansguardian
group: dansguardian
mode: '0640'
when: is_debuntu | bool
when: is_debuntu
- name: Install /etc/dansguardian/dansguardian.conf from template (CentOS)
template:

View file

@ -53,7 +53,7 @@
- name: Check /etc/network/interfaces for gateway
shell: grep {{ device_gw }} /etc/network/interfaces | wc -l
when: is_debuntu | bool
when: is_debuntu
register: wan_file
- name: Setting wan_in_interfaces

View file

@ -2,7 +2,7 @@
package:
name: isc-dhcp-server
state: present
when: is_debuntu | bool
when: is_debuntu
- name: Install dhcp package (not debuntu)
package:
@ -14,14 +14,14 @@
user:
name: dhcpd
createhome: no
when: is_debuntu | bool
when: is_debuntu
- name: Disable stock dhcp_service (debuntu)
service:
name: "{{ dhcp_service }}"
enabled: no
state: stopped
when: is_debuntu | bool
when: is_debuntu
- name: Disable stock dhcp_service ipv6 (ubuntu-18 and higher)
service:
@ -29,7 +29,7 @@
enabled: no
state: stopped
when: is_ubuntu and not is_ubuntu_16
#when: is_ubuntu_18 | bool
#when: is_ubuntu_18
- name: Install systemd unit file to /etc/systemd/system/dhcpd.service
template:
@ -43,7 +43,7 @@
command: touch /var/lib/dhcpd/dhcpd.leases
args:
creates: /var/lib/dhcpd/dhcpd.leases
when: is_redhat | bool
when: is_redhat
- name: Set dhcpd.leases permissions/ownership (redhat)
file:
@ -52,7 +52,7 @@
group: dhcpd
mode: '0644'
# state: file
when: is_redhat | bool
when: is_redhat
- name: "Add 'dhcpd_installed: True' to {{ iiab_state_file }}"
lineinfile:

View file

@ -16,7 +16,7 @@
systemd:
name: dhcpd
state: stopped
when: dhcpd_install | bool
when: dhcpd_install
- name: dhcpd_server may be affected - stopping dnsmasq
systemd:

View file

@ -36,13 +36,13 @@
service:
name: dhcpd
state: stopped
when: dhcpd_install | bool
when: dhcpd_install
- name: dhcpd_server may be affected - stopping dnsmasq
service:
name: dnsmasq
state: stopped
when: dnsmasq_install | bool
when: dnsmasq_install
- name: Stop the LAN/Bridge deleting iiab-LAN
shell: nmcli con delete id iiab-LAN

View file

@ -57,7 +57,7 @@
shell: nmcli conn up id iiab-WAN
register: dhcp_WAN
ignore_errors: yes
when: has_WAN | bool
when: has_WAN
- name: BAD ifcfg-WAN
debug:
@ -117,7 +117,7 @@
register: ifcfg_dhcp_device
ignore_errors: True
changed_when: False
when: dhcp_good | bool
when: dhcp_good
- name: Setting has ifcfg gw based on device if found
set_fact:

View file

@ -56,7 +56,7 @@
#### Start network layout
#- name: Redhat networking
# include_tasks: ifcfg_mods.yml
# when: is_redhat | bool
# when: is_redhat
- name: NetworkManager in use
include_tasks: NM-debian.yml

View file

@ -4,7 +4,7 @@
- bind9
- bind9utils
state: present
when: is_debuntu | bool
when: is_debuntu
- name: "Install named packages: bind, bind-utils (OS's other than debuntu)"
package:
@ -75,7 +75,7 @@
template:
src: roles/network/templates/named/dns-jail.conf
dest: "/etc/{{ apache_conf_dir }}/"
when: dns_jail_enabled | bool
when: dns_jail_enabled
- name: "Add 'named_installed: True' to {{ iiab_state_file }}"
lineinfile:
@ -85,7 +85,7 @@
- name: Enable dns-jail.conf via Apache
command: a2ensite dns-jail.conf
when: dns_jail_enabled | bool
when: dns_jail_enabled
- name: Disable dns-jail.conf via Apache
command: a2dissite: dns-jail.conf

View file

@ -21,19 +21,19 @@
enabled: yes
with_items:
- systemd-networkd-wait-online
when: systemd_networkd_active | bool
when: systemd_networkd_active
- name: Unmask and enable the systemd-networkd service for br0
systemd:
name: systemd-networkd
enabled: yes
masked: no
when: network_manager_active | bool and iiab_lan_iface == "br0"
when: network_manager_active and iiab_lan_iface == "br0"
- name: Ensure systemd-networkd gets enabled for br0
set_fact:
systemd_networkd_active: True
when: network_manager_active | bool and iiab_lan_iface == "br0"
when: network_manager_active and iiab_lan_iface == "br0"
# ICO will always set gui_static_wan_ip away from the default of 'unset' while
# gui_static_wan turns dhcp on/off through wan_ip in computed_network and

View file

@ -46,7 +46,7 @@
systemd:
name: wondershaper
state: restarted
when: wondershaper_enabled | bool
when: wondershaper_enabled
- name: Restart Avahi service (avahi-daemon)
systemd:

View file

@ -7,7 +7,7 @@
- name: "Bigger hammer for Ubuntu, run: /etc/init.d/squid stop"
command: /etc/init.d/squid stop
when: is_ubuntu | bool
when: is_ubuntu
- name: Stop Squid
service:
@ -78,7 +78,7 @@
state: directory
- include_tasks: roles/network/tasks/dansguardian.yml
when: dansguardian_install | bool
when: dansguardian_install
- name: "Add 'squid_installed: True' to {{ iiab_state_file }}"
lineinfile: