diff options
author | Christian Pointner <equinox@spreadspace.org> | 2022-09-10 18:59:12 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2022-09-10 18:59:12 +0200 |
commit | 94a5c548dd3b1409b562f7efaaa68b28a50415ab (patch) | |
tree | 1747d8570c3750e8e3146a792599a14bdbadb6b6 | |
parent | raspios: further cleanup default install (diff) |
fix apt-repo handling and raspios image for armhf based installs
-rw-r--r-- | inventory/group_vars/all/vars.yml | 15 | ||||
-rw-r--r-- | roles/apt-repo/base/defaults/main.yml | 3 | ||||
-rw-r--r-- | roles/apt-repo/base/tasks/main.yml | 2 | ||||
-rw-r--r-- | roles/apt-repo/base/templates/Raspbian.list.j2 | 1 | ||||
-rw-r--r-- | roles/raspios/image/templates/firstrun.sh.j2 | 2 |
5 files changed, 21 insertions, 2 deletions
diff --git a/inventory/group_vars/all/vars.yml b/inventory/group_vars/all/vars.yml index 8caca7f8..154b70a8 100644 --- a/inventory/group_vars/all/vars.yml +++ b/inventory/group_vars/all/vars.yml @@ -34,6 +34,9 @@ apt_repo_providers: ubuntu: host: archive.ubuntu.com path: /ubuntu + raspbian: + host: raspbian.raspberrypi.org + path: /raspbian hetzner: debian: host: mirror.hetzner.de @@ -47,6 +50,9 @@ apt_repo_providers: ubuntu: host: mirror.hetzner.de path: /ubuntu/packages + raspbian: + host: raspbian.raspberrypi.org + path: /raspbian ffgraz: debian: host: debian.ffgraz.net @@ -60,6 +66,9 @@ apt_repo_providers: ubuntu: host: debian.ffgraz.net path: /ubuntu + raspbian: + host: raspbian.raspberrypi.org + path: /raspbian inode: debian: host: debian.inode.at @@ -73,6 +82,9 @@ apt_repo_providers: ubuntu: host: ubuntu.inode.at path: /ubuntu + raspbian: + host: raspbian.raspberrypi.org + path: /raspbian anexia: debian: host: debian.anexia.at @@ -86,3 +98,6 @@ apt_repo_providers: ubuntu: host: ubuntu.anexia.at path: /ubuntu + raspbian: + host: debian.anexia.at + path: /raspbian/raspbian diff --git a/roles/apt-repo/base/defaults/main.yml b/roles/apt-repo/base/defaults/main.yml index 418bc13f..0cab41a8 100644 --- a/roles/apt-repo/base/defaults/main.yml +++ b/roles/apt-repo/base/defaults/main.yml @@ -5,3 +5,6 @@ apt_repo_base_components: - universe debian: - main + raspbian: + - main + - rpi diff --git a/roles/apt-repo/base/tasks/main.yml b/roles/apt-repo/base/tasks/main.yml index e08029ea..22084941 100644 --- a/roles/apt-repo/base/tasks/main.yml +++ b/roles/apt-repo/base/tasks/main.yml @@ -1,7 +1,7 @@ --- - name: install global sources.list template: - src: "{{ ansible_distribution }}.list.j2" + src: "{{ ansible_lsb.id | default(ansible_distribution) }}.list.j2" dest: /etc/apt/sources.list register: apt_repo_base_sources diff --git a/roles/apt-repo/base/templates/Raspbian.list.j2 b/roles/apt-repo/base/templates/Raspbian.list.j2 new file mode 100644 index 00000000..0022470a --- /dev/null +++ b/roles/apt-repo/base/templates/Raspbian.list.j2 @@ -0,0 +1 @@ +deb http://{{ apt_repo_providers[apt_repo_provider].raspbian.host }}{{ apt_repo_providers[apt_repo_provider].raspbian.path }} {{ ansible_distribution_release }} {{ apt_repo_components | default(apt_repo_base_components.raspbian) | join(' ') }} diff --git a/roles/raspios/image/templates/firstrun.sh.j2 b/roles/raspios/image/templates/firstrun.sh.j2 index 68b9ee1e..736d6aa1 100644 --- a/roles/raspios/image/templates/firstrun.sh.j2 +++ b/roles/raspios/image/templates/firstrun.sh.j2 @@ -35,7 +35,7 @@ systemctl disable hciuart.service systemctl disable wpa_supplicant.service export DEBIAN_FRONTEND=noninteractive export SUDO_FORCE_REMOVE=yes -apt-get purge -q -y userconf-pi avahi-daemon triggerhappy rsync dpkg-dev build-essential patch gdb make strace gpg ssh-import-id network-manager udisks2 p7zip p7zip-full sudo +apt-get purge -q -y userconf-pi avahi-daemon triggerhappy rsync dpkg-dev patch gdb make strace ssh-import-id network-manager udisks2 p7zip p7zip-full sudo apt-get autoremove -q -y dpkg -l | grep "^rc" | awk "{ print(\$2) }" | xargs -r dpkg -P |