diff --git a/roles/4-server-options/tasks/main.yml b/roles/4-server-options/tasks/main.yml index 7c913768f..edd787d28 100644 --- a/roles/4-server-options/tasks/main.yml +++ b/roles/4-server-options/tasks/main.yml @@ -16,10 +16,10 @@ when: openvpn_install tags: openvpn -#- name: Configuring wondershaper -# include_tasks: roles/network/tasks/wondershaper.yml -# when: wondershaper_install -# tags: wondershaper, network +- name: Installing dnsmasq + include_tasks: roles/network/tasks/dnsmasq.yml + when: dnsmasq_install + tags: base, domain, dnsmasq, network - name: Installing named include_tasks: roles/network/tasks/named.yml diff --git a/roles/calibre/tasks/debs.yml b/roles/calibre/tasks/debs.yml index 2fdd5cfdc..b00a69d7f 100644 --- a/roles/calibre/tasks/debs.yml +++ b/roles/calibre/tasks/debs.yml @@ -19,7 +19,8 @@ # HOWEVER: it's strongly suggested you wait for apt (blessed by your OS!) - name: Upgrade to Calibre testing .deb's - target Raspbian (rpi) - command: scripts/calibre-install-latest-rpi.sh + #command: scripts/calibre-install-latest-rpi.sh #fails with Calibre 3.24 & 3.25, and beyond? + command: scripts/calibre-install-latest.sh #Debian approach works for now (3.24 & 3.25) when: is_rpi and internet_available - name: Upgrade to Calibre testing .deb's - target Ubuntu 16.04 (not rpi and not ubuntu_18) diff --git a/roles/network/tasks/computed_network.yml b/roles/network/tasks/computed_network.yml index ace548616..861a14c07 100644 --- a/roles/network/tasks/computed_network.yml +++ b/roles/network/tasks/computed_network.yml @@ -117,6 +117,11 @@ # This workaround can and should evolve as IIAB 6.5 matures! when: num_lan_interfaces == "1" and user_lan_iface == "auto" and user_wan_iface == "auto" +- name: Use old gateway device info if not detected and using static ip + set_fact: + iiab_wan_iface: "{{ device_gw }}" + when: wan_ip != "dhcp" and iiab_wan_iface == "none" + - name: No LAN configured - 'Appliance' mode set_fact: iiab_network_mode: "Appliance" diff --git a/roles/network/tasks/dnsmasq.yml b/roles/network/tasks/dnsmasq.yml index 4ffc09dea..0f7c4128b 100644 --- a/roles/network/tasks/dnsmasq.yml +++ b/roles/network/tasks/dnsmasq.yml @@ -1,6 +1,11 @@ - name: Install dnsmasq package: name=dnsmasq state=present +- name: Stop dnsmasq + service: + name: dnsmasq + state: stopped + - name: Configure dhcpd template: src={{ item.src }} dest={{ item.dest }} @@ -8,5 +13,12 @@ group=root mode={{ item.mode }} with_items: - - { src: 'network/dnsmasq.service.rh', dest: '/etc/systemd/system/dnsmasq.service', mode: '0644' } +# - { src: 'network/dnsmasq.service.rh', dest: '/etc/systemd/system/dnsmasq.service', mode: '0644' } + - { src: 'network/dnsmasq.conf.j2' dest: '/etc/dnsmasq.conf' mode: '644' } +- name: Start dnsmasq + systemd: + name: dnsmasq + state: restarted + enabled: yes + daemon_reload: yes diff --git a/roles/network/tasks/enable_services.yml b/roles/network/tasks/enable_services.yml index ee7b395d0..4628874af 100644 --- a/roles/network/tasks/enable_services.yml +++ b/roles/network/tasks/enable_services.yml @@ -46,7 +46,7 @@ when: not dnsmasq_enabled and dnsmasq_install - name: dnsmasq copy config file to /etc - template: src=network/dnsmasq.conf.j2 dest=/etc/ + template: src=network/dnsmasq.conf.j2 dest=/etc/dnsmasq.conf when: dnsmasq_enabled and dnsmasq_install - name: Enable dnsmasq diff --git a/roles/network/templates/network/dnsmasq.conf.j2 b/roles/network/templates/network/dnsmasq.conf.j2 index 3a6365850..282c0b222 100644 --- a/roles/network/templates/network/dnsmasq.conf.j2 +++ b/roles/network/templates/network/dnsmasq.conf.j2 @@ -4,8 +4,10 @@ bogus-priv #server=/{{ iiab_domain }}/{{ iiab_hostname }} # Add local-only domains here, queries in these domains are answered from /etc/hosts or DHCP only. local=/{{ iiab_domain }}/ +{% if captive_portal_enabled == "True" %} # Make all host names resolve to the Raspberry Pi's IP address address=/#/{{ lan_ip }} +{% endif %} # Specify the interface that will listen for DHCP and DNS requests interface={{ iiab_lan_iface }} # Set the domain for dnsmasq diff --git a/scripts/calibre-install-latest-rpi.sh b/scripts/calibre-install-latest-rpi.sh index a5d520bda..ada054c88 100755 --- a/scripts/calibre-install-latest-rpi.sh +++ b/scripts/calibre-install-latest-rpi.sh @@ -3,7 +3,18 @@ # Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical # breakthrough possible! # -# Calibre 3.23 is the latest available from testing as of 2018-05-10: +# Worked up to Calibre 3.23 from May 2018. +# Calibre 3.24 and 3.25 fail to "apt install" in June 2018: +# +# The following packages have unmet dependencies: +# calibre : Depends: python-pyqt5 (>= 5.10.1+dfsg-2) but 5.10.1+dfsg-1+rpi1 is to be installed +# E: Unable to correct problems, you have held broken packages. +# +# Debian approach (calibre-install-latest.sh) is the workaround for now: +# +# https://github.com/iiab/iiab/pull/833 +# +# Calibre 3.25 is the latest available from testing as of 2018-06-10: # # http://raspbian.raspberrypi.org/raspbian/pool/main/c/calibre/ # http://archive.raspbian.org/raspbian/pool/main/c/calibre/ diff --git a/scripts/calibre-install-latest.sh b/scripts/calibre-install-latest.sh index 37764db79..7de7a163f 100755 --- a/scripts/calibre-install-latest.sh +++ b/scripts/calibre-install-latest.sh @@ -3,7 +3,7 @@ # Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical # breakthrough possible! # -# Calibre 3.23 is the latest available from testing as of 2018-05-10: +# Calibre 3.25 is the latest available from testing as of 2018-06-10: # # https://packages.debian.org/search?keywords=calibre # http://deb.debian.org/debian/pool/main/c/calibre/ diff --git a/scripts/calibre-install-unstable.sh b/scripts/calibre-install-unstable.sh index abb950f7c..333985103 100755 --- a/scripts/calibre-install-unstable.sh +++ b/scripts/calibre-install-unstable.sh @@ -3,7 +3,7 @@ # Thanks to Jerry Vonau (https://github.com/jvonau) who made this critical # breakthrough possible! # -# Calibre 3.23 is the latest available from testing as of 2018-05-10: +# Calibre 3.25 is the latest available from testing as of 2018-06-10: # # https://packages.debian.org/search?keywords=calibre # http://deb.debian.org/debian/pool/main/c/calibre/