-
Notifications
You must be signed in to change notification settings - Fork 0
/
raspbian-dnsmasq.json
48 lines (48 loc) · 1.41 KB
/
raspbian-dnsmasq.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"builders": [
{
"type": "arm-image",
"iso_url": "https://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2020-02-14/2020-02-13-raspbian-buster-lite.zip",
"iso_checksum": "12ae6e17bf95b6ba83beca61e7394e7411b45eba7e6a520f434b0748ea7370e8",
"target_image_size": 4294967296
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"export DEBIAN_FRONTEND=noninteractive",
"apt-get update -qq",
"apt-get upgrade -qq -y",
"mkdir /home/pi/.ssh"
]
},
{
"type": "file",
"source": "/host-machine-files/id_rsa.pub",
"destination": "/home/pi/.ssh/authorized_keys"
},
{
"type": "file",
"source": "/host-machine-files/dnsmasq.conf",
"destination": "/etc/dnsmasq.conf"
},
{
"type": "shell",
"inline": [
"chmod 600 /home/pi/.ssh/authorized_keys",
"chown pi /home/pi/.ssh/authorized_keys",
"touch /boot/ssh",
"echo > /etc/motd",
"sed '/PasswordAuthentication/d' -i /etc/ssh/sshd_config",
"echo >> /etc/ssh/sshd_config",
"echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config",
"echo >> /etc/resolvconf.conf",
"echo 'name_servers=127.0.0.1' >> /etc/resolvconf.conf",
"apt-get -qq -y install dnsutils",
"apt-get -qq -y install dnsmasq",
"systemctl enable dnsmasq"
]
}
]
}