summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-02-14 06:57:46 +0000
committerLars Wirzenius <liw@liw.fi>2022-02-14 06:57:46 +0000
commita7c1ffe70a8316f3e8990f25d438bf42478c6463 (patch)
treeeadf1f3d54738d5d732b4cadb7fd4ee84373c790
parentae190f24738cc550ed8be06c077100433da3087a (diff)
parent9691f340ccbdfab0f2c98746e65e6a1a1e05923a (diff)
downloadpuomi-a7c1ffe70a8316f3e8990f25d438bf42478c6463.tar.gz
Merge branch 'liw/improve' into 'main'
fix: use dnsmasq for DHCP, local DNS, instead of systemd See merge request larswirzenius/puomi!8
-rw-r--r--puomi-installer-playbook.yml29
-rw-r--r--puomi-x220.yaml2
2 files changed, 23 insertions, 8 deletions
diff --git a/puomi-installer-playbook.yml b/puomi-installer-playbook.yml
index 8bd5522..eb80b5b 100644
--- a/puomi-installer-playbook.yml
+++ b/puomi-installer-playbook.yml
@@ -15,6 +15,26 @@
- bridge-utils
- man
- ferm
+ - dnsmasq
+ - bind9-dnsutils
+ - locales-all
+
+ - name: "configure dnsmasq for .d support"
+ lineinfile:
+ path: /etc/dnsmasq.conf
+ regexp: ^conf-dir
+ line: "conf-dir=/etc/dnsmasq.d/,*.conf"
+
+ - name: "configure dnsmasq for router"
+ copy:
+ content: |
+ dhcp-range=10.1.1.10,10.1.1.250,255.255.255.0,1h
+ host-record=puomi,10.1.1.1
+ interface=br0
+ interface=lo
+ max-cache-ttl=30
+ neg-ttl=10
+ dest: /etc/dnsmasq.d/router.conf
- name: "configure hostapd"
copy:
@@ -38,7 +58,7 @@
rsn_pairwise=CCMP
dest: /etc/hostapd/hostapd.conf
- - name: "configure ferm"
+ - name: "configure ferm firewall"
copy:
content: |
table filter {
@@ -84,14 +104,9 @@
[Network]
Address=10.1.1.1/24
- DHCPServer=true
+ DHCPServer=false
IPMasquerade=true
ConfigureWithoutCarrier=true
-
- [DHCPServer]
- PoolOffset=100
- PoolSize=50
- EmitDNS=yes
dest: /etc/systemd/network/br0.network
vars:
diff --git a/puomi-x220.yaml b/puomi-x220.yaml
index d770e21..ac4a77d 100644
--- a/puomi-x220.yaml
+++ b/puomi-x220.yaml
@@ -2,7 +2,7 @@
# X220 laptop.
drive: /dev/sda
-hostname: puomi
+hostname: puomi-x220
extra_playbooks:
- puomi-installer-playbook.yml
ansible_vars: