First working version for Netbootbox-Install

This commit is contained in:
Frank Schiebel 2023-09-05 15:11:41 +02:00
parent 790f0327ca
commit 7bf673e2c6
59 changed files with 659 additions and 171 deletions

View file

@ -0,0 +1,39 @@
---
- name: prepare installer boot loader grub
blockinfile:
path: /etc/di-netboot-assistant/grub.cfg.HEAD
insertbefore: "^menuentry 'Boot from local disk..'"
marker: "# {mark} ANSIBLE MANAGED BLOCK netboot-installer"
block: |
menuentry 'Installer Debian bookworm (amd64) + preseed + lmn-desktop.yml' --unrestricted {
linux (http,{{ ansible_default_ipv4.address }})/d-i/n-pkg/images/12/amd64/text/debian-installer/amd64/linux auto=true priority=critical \
url=tftp://{{ ansible_default_ipv4.address }}/d-i/bookworm/preseed.cfg_lmn-desktop \
playbook=lmn-desktop.yml adpw='{{ gapw }}' ---
initrd (http,{{ ansible_default_ipv4.address }})/d-i/n-pkg/images/12/amd64/text/debian-installer/amd64/initrd.gz
}
notify: rebuild di-netboot menu
- name: set git-daemon-export-ok for management repo
copy:
content: ""
dest: "{{ playbook_dir }}/.git/git-daemon-export-ok"
force: false
group: ansible
owner: ansible
mode: 0644
- name: Create gitd systemd service file
template:
src: templates/lmn-netboot-git.service.j2
dest: /lib/systemd/system/lmn-netboot-git.service
- name: Start gitd service for installation playbook
systemd:
name: lmn-netboot-git
state: started
- name: provide preseed.cfg_lmn-desktop file
template:
src: templates/preseed.cfg_lmn-desktop.j2
dest: /var/lib/tftpboot/d-i/bookworm/preseed.cfg_lmn-desktop
notify: restart git service