Implement livebox gnome-edu image build.
This commit is contained in:
parent
6438585128
commit
829b8b4d3b
55 changed files with 608 additions and 4 deletions
27
roles/edulive/templates/livebuilder.sh
Normal file
27
roles/edulive/templates/livebuilder.sh
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/bash
|
||||
#
|
||||
# build live images and copy kernel, initramfs and squashfs
|
||||
#
|
||||
|
||||
set -eu
|
||||
|
||||
BUILDD="{{ build_dir }}"
|
||||
|
||||
run_build(){
|
||||
local DEST="/var/lib/tftpboot/d-i/n-live/$1/live/"
|
||||
cd "$BUILDD/$1"
|
||||
[[ -d "$DEST" ]] || mkdir -vp "$DEST"
|
||||
|
||||
lb clean && lb config && lb build
|
||||
|
||||
for FILE in vmlinuz initrd.img filesystem.squashfs ; do
|
||||
ln -vf "$BUILDD/$1/binary/live/$FILE" "$DEST"
|
||||
done
|
||||
}
|
||||
|
||||
## main:
|
||||
|
||||
for IMG in {{ build_images|join(' ') }} ; do
|
||||
echo "=========== Building image $IMG ==========="
|
||||
run_build $IMG
|
||||
done
|
||||
54
roles/edulive/templates/main.yml
Normal file
54
roles/edulive/templates/main.yml
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
---
|
||||
- name: install packages
|
||||
apt:
|
||||
name:
|
||||
- live-build
|
||||
state: latest # noqa package-latest
|
||||
|
||||
- name: prepare live-build directory
|
||||
file:
|
||||
path: /opt/live-build/
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: copy build script
|
||||
template:
|
||||
src: livebuilder.sh
|
||||
dest: /usr/local/sbin/
|
||||
mode: 0755
|
||||
|
||||
- name: copy live-build configuration
|
||||
copy:
|
||||
src: gnome-edu
|
||||
dest: /opt/live-build/
|
||||
local_follow: false
|
||||
notify: build image
|
||||
|
||||
- name: prepare debian live boot loader ipxe
|
||||
blockinfile:
|
||||
path: /etc/di-netboot-assistant/ipxemenu.HEAD
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK gnome-edu"
|
||||
block: |
|
||||
:gnome-edu
|
||||
echo Booting Debian GNU/Linux EDU LIVE
|
||||
kernel ${210:string}d-i/n-live/gnome-edu/live/vmlinuz \
|
||||
initrd=initrd.img-5.10.0-13-amd64 {{ boot_params|join(' ') }} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/gnome-edu/
|
||||
initrd ${210:string}d-i/n-live/gnome-edu/live/initrd.img
|
||||
boot
|
||||
notify: rebuild di-netboot menu
|
||||
|
||||
- name: prepare debian live boot loader grub
|
||||
blockinfile:
|
||||
path: /etc/di-netboot-assistant/grub.cfg.HEAD
|
||||
insertbefore: "^menuentry 'Boot from local disk..'"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK gnome-edu"
|
||||
block: |
|
||||
menuentry 'Debian GNU/Linux Live gnome-edu' {
|
||||
linux (http,{{ ansible_default_ipv4.address }})/d-i/n-live/gnome-edu/live/vmlinuz \
|
||||
{{ boot_params|join(' ') }} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/gnome-edu/
|
||||
initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-live/gnome-edu/live/initrd.img
|
||||
}
|
||||
notify: rebuild di-netboot menu
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue