mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #825 from jvonau/not_detected
Fallback to old gateway info when WAN is not detected
This commit is contained in:
commit
9214de14bf
5 changed files with 25 additions and 6 deletions
|
@ -16,10 +16,10 @@
|
||||||
when: openvpn_install
|
when: openvpn_install
|
||||||
tags: openvpn
|
tags: openvpn
|
||||||
|
|
||||||
#- name: Configuring wondershaper
|
- name: Installing dnsmasq
|
||||||
# include_tasks: roles/network/tasks/wondershaper.yml
|
include_tasks: roles/network/tasks/dnsmasq.yml
|
||||||
# when: wondershaper_install
|
when: dnsmasq_install
|
||||||
# tags: wondershaper, network
|
tags: base, domain, dnsmasq, network
|
||||||
|
|
||||||
- name: Installing named
|
- name: Installing named
|
||||||
include_tasks: roles/network/tasks/named.yml
|
include_tasks: roles/network/tasks/named.yml
|
||||||
|
|
|
@ -117,6 +117,11 @@
|
||||||
# This workaround can and should evolve as IIAB 6.5 matures!
|
# 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"
|
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
|
- name: No LAN configured - 'Appliance' mode
|
||||||
set_fact:
|
set_fact:
|
||||||
iiab_network_mode: "Appliance"
|
iiab_network_mode: "Appliance"
|
||||||
|
|
|
@ -1,6 +1,11 @@
|
||||||
- name: Install dnsmasq
|
- name: Install dnsmasq
|
||||||
package: name=dnsmasq state=present
|
package: name=dnsmasq state=present
|
||||||
|
|
||||||
|
- name: Stop dnsmasq
|
||||||
|
service:
|
||||||
|
name: dnsmasq
|
||||||
|
state: stopped
|
||||||
|
|
||||||
- name: Configure dhcpd
|
- name: Configure dhcpd
|
||||||
template: src={{ item.src }}
|
template: src={{ item.src }}
|
||||||
dest={{ item.dest }}
|
dest={{ item.dest }}
|
||||||
|
@ -8,5 +13,12 @@
|
||||||
group=root
|
group=root
|
||||||
mode={{ item.mode }}
|
mode={{ item.mode }}
|
||||||
with_items:
|
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
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
when: not dnsmasq_enabled and dnsmasq_install
|
when: not dnsmasq_enabled and dnsmasq_install
|
||||||
|
|
||||||
- name: dnsmasq copy config file to /etc
|
- 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
|
when: dnsmasq_enabled and dnsmasq_install
|
||||||
|
|
||||||
- name: Enable dnsmasq
|
- name: Enable dnsmasq
|
||||||
|
|
|
@ -4,8 +4,10 @@ bogus-priv
|
||||||
#server=/{{ iiab_domain }}/{{ iiab_hostname }}
|
#server=/{{ iiab_domain }}/{{ iiab_hostname }}
|
||||||
# Add local-only domains here, queries in these domains are answered from /etc/hosts or DHCP only.
|
# Add local-only domains here, queries in these domains are answered from /etc/hosts or DHCP only.
|
||||||
local=/{{ iiab_domain }}/
|
local=/{{ iiab_domain }}/
|
||||||
|
{% if captive_portal_enabled == "True" %}
|
||||||
# Make all host names resolve to the Raspberry Pi's IP address
|
# Make all host names resolve to the Raspberry Pi's IP address
|
||||||
address=/#/{{ lan_ip }}
|
address=/#/{{ lan_ip }}
|
||||||
|
{% endif %}
|
||||||
# Specify the interface that will listen for DHCP and DNS requests
|
# Specify the interface that will listen for DHCP and DNS requests
|
||||||
interface={{ iiab_lan_iface }}
|
interface={{ iiab_lan_iface }}
|
||||||
# Set the domain for dnsmasq
|
# Set the domain for dnsmasq
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue