First working version for Netbootbox-Install
This commit is contained in:
parent
790f0327ca
commit
7bf673e2c6
59 changed files with 659 additions and 171 deletions
|
@ -1,2 +1,3 @@
|
|||
This config space is based on:
|
||||
https://salsa.debian.org/live-team/live-images/-/tree/debian/images/gnome-desktop
|
||||
https://salsa.debian.org/live-team/live-images/-/tree/debian/images/gnome-desktop
|
||||
|
||||
|
|
|
@ -7,12 +7,10 @@ lb config noauto \
|
|||
--cache false \
|
||||
--net-tarball false \
|
||||
--ignore-system-defaults \
|
||||
--distribution bullseye \
|
||||
--distribution bookworm \
|
||||
--binary-images netboot \
|
||||
--mode debian \
|
||||
--backports true \
|
||||
--linux-packages linux-image \
|
||||
--archive-areas "main contrib non-free" \
|
||||
--mirror-bootstrap http://localhost:3142/deb.debian.org/debian/ \
|
||||
--mirror-chroot-security http://localhost:3142/security.debian.org/debian-security/ \
|
||||
--archive-areas "main non-free-firmware contrib non-free" \
|
||||
"${@}"
|
||||
|
|
|
@ -2,14 +2,20 @@
|
|||
|
||||
set -e
|
||||
|
||||
echo 'pref("browser.startup.homepage", "https://www.startpage.com");' >> /etc/firefox-esr/firefox-esr.js
|
||||
echo 'pref("network.proxy.type", 4);' >> /etc/firefox-esr/firefox-esr.js
|
||||
|
||||
dconf update
|
||||
|
||||
#sed -i "s/^/#/" /etc/xdg/user-dirs.defaults
|
||||
|
||||
sed -i "s/^#WaylandEnable=false$/WaylandEnable=false/" /etc/gdm3/daemon.conf
|
||||
|
||||
## shared directory:
|
||||
mkdir /media/tmpshare
|
||||
echo "livebox:/srv/tmpshare /media/tmpshare nfs rw,auto,nofail,nolock 0 0" >> /etc/fstab
|
||||
|
||||
## remote journal:
|
||||
echo "URL=http://livebox" >> /etc/systemd/journal-upload.conf
|
||||
ln -s /lib/systemd/system/systemd-journal-upload.service \
|
||||
/etc/systemd/system/multi-user.target.wants/systemd-journal-upload.service
|
||||
|
||||
## workaround https://bugzilla.gnome.org/show_bug.cgi?id=730587
|
||||
#dpkg-divert --divert /usr/bin/gnome-keyring-daemon.bak --rename /usr/bin/gnome-keyring-daemon
|
||||
|
|
1
roles/edulive/files/gnome-edu/config/includes.chroot/etc/firefox
Symbolic link
1
roles/edulive/files/gnome-edu/config/includes.chroot/etc/firefox
Symbolic link
|
@ -0,0 +1 @@
|
|||
firefox-esr
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"policies": {
|
||||
"Proxy": {
|
||||
"Mode": "system"
|
||||
},
|
||||
"OverrideFirstRunPage": "https://www.debian.org",
|
||||
"Homepage": {
|
||||
"URL": "https://www.debian.org",
|
||||
"Locked": false,
|
||||
"StartPage": "previous-session"
|
||||
},
|
||||
"DisplayBookmarksToolbar": true,
|
||||
"ManagedBookmarks": [
|
||||
{
|
||||
"toplevel_name": "Debian"
|
||||
},
|
||||
{
|
||||
"url": "https://www.debian.org",
|
||||
"name": "Debian Homepage"
|
||||
},
|
||||
{
|
||||
"url": "https://wiki.debian.org",
|
||||
"name": "Debian Wiki"
|
||||
},
|
||||
{
|
||||
"name": "Debian Development",
|
||||
"children": [
|
||||
{
|
||||
"url": "https://bugs.debian.org",
|
||||
"name": "Debian Bug Tracker"
|
||||
},
|
||||
{
|
||||
"url": "https://packages.debian.org",
|
||||
"name": "Debian Packages"
|
||||
},
|
||||
{
|
||||
"url": "https://salsa.debian.org",
|
||||
"name": "Debian Salsa"
|
||||
},
|
||||
{
|
||||
"url": "https://tracker.debian.org",
|
||||
"name": "Package Tracker"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Debian LAN/Live",
|
||||
"children": [
|
||||
{
|
||||
"url": "https://salsa.debian.org/andi/debian-lan-ansible",
|
||||
"name": "Debian LAN Ansible"
|
||||
},
|
||||
{
|
||||
"url": "https://wiki.debian.org/DebianLive",
|
||||
"name": "Debian Live"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"SearchEngines": {
|
||||
"Add": [
|
||||
{
|
||||
"Name": "Startpage",
|
||||
"URLTemplate": "https://www.startpage.com/sp/search?query={searchTerms}",
|
||||
"Method": "GET",
|
||||
"IconURL": "https://www.startpage.com/sp/cdn/favicons/favicon--default.ico",
|
||||
"Alias": "sp",
|
||||
"Description": "Startpage Search Engine"
|
||||
}
|
||||
],
|
||||
"Default": "Startpage"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -85,19 +85,16 @@ or other application using the libvirt API.
|
|||
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x5'/>
|
||||
</controller>
|
||||
<interface type='direct'>
|
||||
<mac address='52:54:00:VMMAC'/>
|
||||
<source dev='INTERFACE' mode='bridge'/>
|
||||
<model type='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='network'>
|
||||
<mac address='52:54:00:46:a6:25'/>
|
||||
<source network='default'/>
|
||||
<model type='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
|
||||
</interface>
|
||||
<interface type='network'>
|
||||
<mac address='52:54:00:5c:fc:08'/>
|
||||
<source network='intern'/>
|
||||
<model type='virtio'/>
|
||||
<address type='pci' domain='0x0000' bus='0x07' slot='0x00' function='0x0'/>
|
||||
|
|
|
@ -3,9 +3,5 @@
|
|||
|
||||
set -eu
|
||||
|
||||
NIC="$(ip link | grep "^2: " | cut -d ' ' -f2 | sed "s/://")"
|
||||
MAC="$(ip link | grep -A1 "^2: " | grep -oE "[[:xdigit:]]{2}:[[:xdigit:]]{2}:[[:xdigit:]]{2} " \
|
||||
| sed "s/ //g")"
|
||||
|
||||
sed -i -e "s/VMMAC/$MAC/g" -e "s/INTERFACE/$NIC/g" /etc/libvirt/qemu/netboot.xml
|
||||
|
||||
NIC="$(ip route | grep -m1 default | sed -E "s/.+dev (\w+).*/\1/")"
|
||||
sed -i -e "s/INTERFACE/$NIC/g" /etc/libvirt/qemu/netboot.xml
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
##
|
||||
## packages for CLI programs
|
||||
##
|
||||
console-setup
|
||||
emacs-nox
|
||||
git
|
||||
htop
|
||||
mc
|
||||
minicom
|
||||
ncdu
|
||||
netcat-openbsd
|
||||
net-tools
|
||||
nfs-common
|
||||
nmap
|
||||
screen
|
||||
shellcheck
|
||||
sl
|
||||
systemd-journal-remote
|
||||
tcpdump
|
||||
tmux
|
||||
tree
|
||||
vim
|
||||
xterm
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
##
|
||||
## packages for GUI programs
|
||||
##
|
||||
|
||||
bluefish
|
||||
codeblocks
|
||||
dia
|
||||
emacs
|
||||
freecad
|
||||
ghex
|
||||
gimp
|
||||
inkscape
|
||||
keepassxc
|
||||
kicad
|
||||
librecad
|
||||
mu-editor
|
||||
#nautilus-nextcloud
|
||||
#nextcloud-desktop
|
||||
obs-studio
|
||||
openboard
|
||||
pdf-presenter-console
|
||||
qtcreator
|
||||
#scrcpy
|
||||
spyder
|
||||
ssh-askpass-gnome
|
||||
sway
|
||||
task-german-desktop
|
||||
terminator
|
||||
#texlive
|
||||
#texlive-lang-german
|
||||
#texlive-latex-extra
|
||||
#texlive-science
|
||||
thonny
|
||||
#thunderbird
|
||||
#thunderbird-l10n-de
|
||||
virt-manager
|
||||
vlc
|
||||
vym
|
||||
webext-privacy-badger
|
||||
webext-ublock-origin-chromium
|
||||
webext-ublock-origin-firefox
|
||||
wireshark
|
||||
xournal
|
|
@ -1,100 +0,0 @@
|
|||
#
|
||||
# This file is linked to all desktop configurations.
|
||||
# Put desktop specific packages in the desktop specific file.
|
||||
#
|
||||
#webext-ublock-origin-firefox
|
||||
#webext-ublock-origin-chromium
|
||||
webext-ublock-origin
|
||||
webext-privacy-badger
|
||||
|
||||
vim
|
||||
emacs
|
||||
vlc
|
||||
gimp
|
||||
inkscape
|
||||
bluefish
|
||||
|
||||
openboard
|
||||
xournal
|
||||
|
||||
freecad
|
||||
librecad
|
||||
kicad
|
||||
|
||||
git
|
||||
mc
|
||||
tmux
|
||||
wireshark
|
||||
nmap
|
||||
netcat-openbsd
|
||||
net-tools
|
||||
thonny
|
||||
spyder
|
||||
ghex
|
||||
|
||||
codeblocks
|
||||
gprolog
|
||||
qtcreator
|
||||
obs-studio
|
||||
|
||||
mu-editor
|
||||
dia
|
||||
vym
|
||||
shellcheck
|
||||
xterm
|
||||
|
||||
tree
|
||||
console-setup
|
||||
virt-manager
|
||||
sway
|
||||
|
||||
task-german-desktop
|
||||
|
||||
ssh-askpass-gnome
|
||||
keepassxc
|
||||
|
||||
#nextcloud-desktop
|
||||
#nautilus-nextcloud
|
||||
#thunderbird
|
||||
#thunderbird-l10n-de
|
||||
|
||||
#texlive
|
||||
#texlive-latex-extra
|
||||
#texlive-lang-german
|
||||
#texlive-science
|
||||
|
||||
pdf-presenter-console
|
||||
|
||||
libreoffice/bullseye-backports
|
||||
libreoffice-core/bullseye-backports
|
||||
libreoffice-common/bullseye-backports
|
||||
libreoffice-writer/bullseye-backports
|
||||
libreoffice-calc/bullseye-backports
|
||||
libreoffice-impress/bullseye-backports
|
||||
libreoffice-base/bullseye-backports
|
||||
libreoffice-base-drivers/bullseye-backports
|
||||
libreoffice-math/bullseye-backports
|
||||
libreoffice-report-builder-bin/bullseye-backports
|
||||
libreoffice-style-colibre/bullseye-backports
|
||||
libreoffice-gnome/bullseye-backports
|
||||
libreoffice-gtk3/bullseye-backports
|
||||
libreoffice-style-elementary/bullseye-backports
|
||||
libreoffice-help-common/bullseye-backports
|
||||
libreoffice-help-de/bullseye-backports
|
||||
libreoffice-java-common/bullseye-backports
|
||||
libreoffice-l10n-de/bullseye-backports
|
||||
libreoffice-nlpsolver/bullseye-backports
|
||||
libreoffice-report-builder/bullseye-backports
|
||||
libreoffice-script-provider-bsh/bullseye-backports
|
||||
libreoffice-script-provider-js/bullseye-backports
|
||||
libreoffice-script-provider-python/bullseye-backports
|
||||
libreoffice-sdbc-firebird/bullseye-backports
|
||||
libreoffice-sdbc-hsqldb/bullseye-backports
|
||||
libreoffice-sdbc-mysql/bullseye-backports
|
||||
libreoffice-sdbc-postgresql/bullseye-backports
|
||||
libreoffice-wiki-publisher/bullseye-backports
|
||||
|
||||
python3-uno/bullseye-backports
|
||||
libuno-sal3/bullseye-backports
|
||||
fonts-opensymbol/bullseye-backports
|
||||
ure/bullseye-backports
|
3
roles/edulive/files/standard-edu/README
Normal file
3
roles/edulive/files/standard-edu/README
Normal file
|
@ -0,0 +1,3 @@
|
|||
This config space is based on:
|
||||
https://salsa.debian.org/live-team/live-images/-/tree/debian/images/standard
|
||||
|
5
roles/edulive/files/standard-edu/auto/build
Executable file
5
roles/edulive/files/standard-edu/auto/build
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
lb build noauto "${@}" 2>&1 | tee build.log
|
10
roles/edulive/files/standard-edu/auto/clean
Executable file
10
roles/edulive/files/standard-edu/auto/clean
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
lb clean noauto "${@}"
|
||||
|
||||
rm -f config/binary config/bootstrap config/chroot config/common config/source
|
||||
rm -f config/control
|
||||
|
||||
rm -f build.log
|
16
roles/edulive/files/standard-edu/auto/config
Executable file
16
roles/edulive/files/standard-edu/auto/config
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
lb config noauto \
|
||||
--clean \
|
||||
--cache false \
|
||||
--net-tarball false \
|
||||
--ignore-system-defaults \
|
||||
--distribution bookworm \
|
||||
--binary-images netboot \
|
||||
--mode debian \
|
||||
--backports true \
|
||||
--linux-packages linux-image \
|
||||
--archive-areas "main non-free-firmware contrib non-free" \
|
||||
"${@}"
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -e /usr/sbin/plymouth-set-default-theme ] && [ -e /usr/share/plymouth/themes/lines ]
|
||||
then
|
||||
plymouth-set-default-theme lines
|
||||
fi
|
|
@ -0,0 +1,16 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Disable kexec-tools
|
||||
|
||||
if [ -e /sbin/kexec ]
|
||||
then
|
||||
echo "kexec-tools kexec-tools/load_kexec boolean false" > /root/preseed
|
||||
|
||||
debconf-set-selections /root/preseed
|
||||
|
||||
rm -f /root/preseed
|
||||
|
||||
dpkg-reconfigure kexec-tools
|
||||
fi
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# Disable tmpfs on /tmp
|
||||
|
||||
if [ -e /etc/default/rcS ]
|
||||
then
|
||||
sed -i -e 's|^ *RAMTMP=.*|RAMTMP=no|' /etc/default/rcS
|
||||
fi
|
15
roles/edulive/files/standard-edu/config/hooks/live/0500-tmpshare.hook.chroot
Executable file
15
roles/edulive/files/standard-edu/config/hooks/live/0500-tmpshare.hook.chroot
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
## shared directory:
|
||||
mkdir /media/tmpshare
|
||||
echo "livebox:/srv/tmpshare /media/tmpshare nfs rw,auto,nofail,nolock 0 0" >> /etc/fstab
|
||||
|
||||
## remote journal:
|
||||
echo "URL=http://livebox" >> /etc/systemd/journal-upload.conf
|
||||
ln -s /lib/systemd/system/systemd-journal-upload.service \
|
||||
/etc/systemd/system/multi-user.target.wants/systemd-journal-upload.service
|
||||
|
||||
## workaround https://bugzilla.gnome.org/show_bug.cgi?id=730587
|
||||
#dpkg-divert --divert /usr/bin/gnome-keyring-daemon.bak --rename /usr/bin/gnome-keyring-daemon
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0020-create-mtab-symlink.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0030-enable-cryptsetup.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0040-create-locales-files.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0100-remove-adjtime-configuration.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0110-remove-backup-files.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0120-remove-dbus-machine-id.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0130-remove-gnome-icon-cache.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0140-remove-log-files.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0150-remove-mdadm-configuration.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0160-remove-openssh-server-host-keys.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0170-remove-python-py.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0180-remove-systemd-machine-id.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0190-remove-temporary-files.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0195-remove-ssl-cert-snakeoil.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0200-remove-udev-persistent-cd-rules.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0300-remove-udev-persistent-net-rules.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0400-update-apt-file-cache.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0410-update-apt-xapian-index.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0420-update-glx-alternative.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0430-update-mlocate-database.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0440-update-nvidia-alternative.hook.chroot
|
|
@ -0,0 +1 @@
|
|||
/usr/share/live/build/hooks/normal/0500-reproducible-glibc.hook.chroot
|
|
@ -0,0 +1,3 @@
|
|||
# Uncomment the following to stop low-level messages on console
|
||||
kernel.printk = 3 4 1 3
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
echo 'Acquire::http::Proxy "http://livebox:3142";' >> /etc/apt/apt.conf.d/10proxy
|
|
@ -0,0 +1,2 @@
|
|||
live-manual
|
||||
live-tools
|
|
@ -0,0 +1,3 @@
|
|||
live-boot
|
||||
live-config
|
||||
live-config-systemd
|
|
@ -0,0 +1,2 @@
|
|||
task-english
|
||||
task-german
|
|
@ -0,0 +1,24 @@
|
|||
##
|
||||
## packages for CLI programs
|
||||
##
|
||||
console-setup
|
||||
emacs-nox
|
||||
git
|
||||
htop
|
||||
mc
|
||||
minicom
|
||||
ncdu
|
||||
netcat-openbsd
|
||||
net-tools
|
||||
nfs-common
|
||||
nmap
|
||||
screen
|
||||
shellcheck
|
||||
sl
|
||||
systemd-journal-remote
|
||||
tcpdump
|
||||
tmux
|
||||
tree
|
||||
vim
|
||||
xterm
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
! Packages Priority standard
|
||||
|
||||
task-ssh-server
|
|
@ -1,12 +1,20 @@
|
|||
---
|
||||
- name: run the image build script
|
||||
command:
|
||||
ansible.builtin.command:
|
||||
cmd: livebuilder.sh
|
||||
listen: run build script
|
||||
|
||||
- name: enable timer for livebuilder
|
||||
systemd:
|
||||
ansible.builtin.systemd:
|
||||
name: livebuilder.timer
|
||||
state: started
|
||||
enabled: true
|
||||
listen: enable livebuilder.timer
|
||||
|
||||
- name: restart systemd-journal-remote
|
||||
ansible.builtin.systemd:
|
||||
name: systemd-journal-remote.socket
|
||||
daemon_reload: true
|
||||
state: restarted
|
||||
enabled: true
|
||||
listen: restart systemd-journal-remote
|
||||
|
|
|
@ -1,24 +1,61 @@
|
|||
---
|
||||
- name: install packages
|
||||
apt:
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
- live-build
|
||||
- systemd-journal-remote
|
||||
state: latest # noqa package-latest
|
||||
|
||||
- name: prepare live-build directory
|
||||
file:
|
||||
ansible.builtin.file:
|
||||
path: /etc/systemd/system/systemd-journal-remote.service.d/
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: configure remote journal
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/systemd/system/systemd-journal-remote.service.d/override.conf
|
||||
create: true
|
||||
block: |
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/lib/systemd/systemd-journal-remote --listen-http=-3 --output=/var/log/journal/remote
|
||||
notify: restart systemd-journal-remote
|
||||
|
||||
- name: prepare live-build directory
|
||||
ansible.builtin.file:
|
||||
path: "{{ build_dir }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: copy build script
|
||||
template:
|
||||
ansible.builtin.template:
|
||||
src: livebuilder.sh
|
||||
dest: /usr/local/sbin/
|
||||
mode: 0755
|
||||
|
||||
- name: prepare shared directory
|
||||
ansible.builtin.file:
|
||||
path: "/srv/tmpshare"
|
||||
state: directory
|
||||
mode: "1777"
|
||||
|
||||
- name: mount tmpfs on shared directory
|
||||
ansible.builtin.mount:
|
||||
path: "/srv/tmpshare/"
|
||||
src: "tmpfs"
|
||||
fstype: tmpfs
|
||||
opts: rw,nofail
|
||||
state: mounted
|
||||
|
||||
- name: export shared directory
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/exports
|
||||
line: "/srv/tmpshare/ *(rw,fsid=0,crossmnt,no_subtree_check)"
|
||||
notify: export nfs
|
||||
|
||||
- name: provide service and timer for livebuilder
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "/etc/systemd/system/{{ item }}"
|
||||
mode: 0644
|
||||
|
@ -28,47 +65,70 @@
|
|||
notify: "enable livebuilder.timer"
|
||||
|
||||
- name: copy live-build configuration
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ build_dir }}"
|
||||
force: false
|
||||
local_follow: false
|
||||
mode: preserve
|
||||
loop: "{{ build_images }}"
|
||||
|
||||
- name: prepare debian live nfs boot entry title
|
||||
lineinfile:
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/di-netboot-assistant/ipxemenu.HEAD
|
||||
insertafter: '-- Customized Boot Entries --'
|
||||
line: "item {{ item }} Debian GNU/Linux {{ item }} NFS"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK menu entries {{ item }}"
|
||||
block: |
|
||||
item {{ item }}-NFS Debian GNU/Linux {{ item }} NFS
|
||||
item {{ item }}-RAM Debian GNU/Linux {{ item }} RAM
|
||||
loop:
|
||||
"{{ build_images }}"
|
||||
notify: rebuild di-netboot menu
|
||||
|
||||
- name: prepare debian live boot loader ipxe
|
||||
blockinfile:
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/di-netboot-assistant/ipxemenu.HEAD
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
|
||||
block: |
|
||||
:{{ item }}
|
||||
echo Booting Debian GNU/Linux EDU LIVE NFS
|
||||
:{{ item }}-NFS
|
||||
echo Booting Debian GNU/Linux {{ item }} NFS
|
||||
kernel ${210:string}d-i/n-live/{{ item }}/live/vmlinuz \
|
||||
initrd=initrd.img {{ boot_params|join(' ') }} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
|
||||
initrd=initrd.img netboot=nfs {{ boot_params|join(' ') }} hostname=${netX/mac} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
|
||||
initrd ${210:string}d-i/n-live/{{ item }}/live/initrd.img
|
||||
boot
|
||||
|
||||
:{{ item }}-RAM
|
||||
echo Booting Debian GNU/Linux {{ item }} RAM
|
||||
kernel ${210:string}d-i/n-live/{{ item }}/live/vmlinuz \
|
||||
initrd=initrd.img {{ boot_params|join(' ') }} hostname=${netX/mac} \
|
||||
fetch=http://{{ ansible_default_ipv4.address }}/d-i/n-live/{{ item }}/live/filesystem.squashfs
|
||||
initrd ${210:string}d-i/n-live/{{ item }}/live/initrd.img
|
||||
boot
|
||||
loop: "{{ build_images }}"
|
||||
notify: rebuild di-netboot menu
|
||||
|
||||
- name: prepare debian live boot loader grub
|
||||
blockinfile:
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/di-netboot-assistant/grub.cfg.HEAD
|
||||
insertbefore: "^menuentry 'Boot from local disk..'"
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ item }}"
|
||||
block: |
|
||||
menuentry 'Debian GNU/Linux Live {{ item }} NFS' {
|
||||
regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 \
|
||||
"\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
|
||||
linux (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/vmlinuz \
|
||||
{{ boot_params|join(' ') }} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
|
||||
netboot=nfs {{ boot_params|join(' ') }} hostname=${oct4}${oct5}${oct6} \
|
||||
nfsroot={{ ansible_default_ipv4.address }}:/var/lib/tftpboot/d-i/n-live/{{ item }}/
|
||||
initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/initrd.img
|
||||
}
|
||||
|
||||
menuentry 'Debian GNU/Linux Live {{ item }} RAM' {
|
||||
regexp --set=1:oct4 --set=2:oct5 --set=3:oct6 \
|
||||
"\:([[:xdigit:]]+)\:([[:xdigit:]]+)\:([[:xdigit:]]+)\$" $net_default_mac
|
||||
linux (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/vmlinuz \
|
||||
{{ boot_params|join(' ') }} hostname=${oct4}${oct5}${oct6} \
|
||||
fetch=http://{{ ansible_default_ipv4.address }}/d-i/n-live/{{ item }}/live/filesystem.squashfs
|
||||
initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-live/{{ item }}/live/initrd.img
|
||||
}
|
||||
loop: "{{ build_images }}"
|
||||
|
|
|
@ -19,6 +19,13 @@ run_build(){
|
|||
done
|
||||
}
|
||||
|
||||
clean_share(){
|
||||
local TMPSHARE="/srv/tmpshare/"
|
||||
find "$TMPSHARE/" -mindepth 1 -delete
|
||||
echo "All content in this directory will be removed periodically!" \
|
||||
>> "$TMPSHARE/README"
|
||||
}
|
||||
|
||||
## main:
|
||||
|
||||
if ! auto-apt-proxy | grep -q 'http://127.0.0.1:3142' ; then
|
||||
|
@ -30,3 +37,4 @@ for IMG in {{ build_images|join(' ') }} ; do
|
|||
echo "=========== Building image $IMG ==========="
|
||||
run_build $IMG
|
||||
done
|
||||
clean_share
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue