summaryrefslogtreecommitdiff
path: root/roles/installer/raspios/image/templates/firstrun.sh.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/raspios/image/templates/firstrun.sh.j2')
-rw-r--r--roles/installer/raspios/image/templates/firstrun.sh.j211
1 files changed, 10 insertions, 1 deletions
diff --git a/roles/installer/raspios/image/templates/firstrun.sh.j2 b/roles/installer/raspios/image/templates/firstrun.sh.j2
index 96c74b39..ef90cf8b 100644
--- a/roles/installer/raspios/image/templates/firstrun.sh.j2
+++ b/roles/installer/raspios/image/templates/firstrun.sh.j2
@@ -76,8 +76,10 @@ EOF
{% if not (install_dhcp | default(false)) %}
cat <<EOF > /etc/resolv.conf
# Generated by ansible
+{% if 'domain' in network %}
search {{ network.domain }}
-{% for nameserver in network.nameservers %}
+{% endif %}
+{% for nameserver in (network.nameservers | default([])) %}
nameserver {{ nameserver }}
{% endfor %}
EOF
@@ -108,6 +110,13 @@ rm "$FW_LOC/firstrun.sh"
rm -f /etc/sudoers.d/010_pi-nopasswd
rm -f /etc/apt/sources.list.d/vscode.list
rm -f /etc/apt/trusted.gpg.d/microsoft.gpg
+rm -f /etc/apt/sources.list.d/raspi.list
+cat <<EOF > /etc/apt/sources.list
+deb http://{{ apt_repo_providers[apt_repo_provider].debian.host }}{{ apt_repo_providers[apt_repo_provider].debian.path }} {{ install_codename }} main non-free-firmware
+deb http://{{ apt_repo_providers[apt_repo_provider].debian.host }}{{ apt_repo_providers[apt_repo_provider].debian.path }} {{ install_codename }}-updates main non-free-firmware
+deb http://{{ apt_repo_providers[apt_repo_provider].debian_security.host }}{{ apt_repo_providers[apt_repo_provider].debian_security.path }} {{ install_codename }}-security main non-free-firmware
+deb http://{{ apt_repo_providers[apt_repo_provider].raspios.host }}{{ apt_repo_providers[apt_repo_provider].raspios.path }} {{ install_codename }} main
+EOF
apt-get update -q
apt-get dist-upgrade -y -q