trixie/roles/preseed-installer/tasks/main.yml

50 lines
2 KiB
YAML
Raw Normal View History

2018-05-31 18:20:51 +03:00
- name: make preseed directory available
file:
path: "{{ tftp_root }}/d-i/{{ di_dist }}"
state: directory
- name: provide preseed file
2018-06-04 18:00:25 +03:00
copy:
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
2018-05-31 18:20:51 +03:00
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
2018-06-04 18:00:25 +03:00
force: no
2018-05-31 18:20:51 +03:00
2018-06-04 18:00:25 +03:00
- name: make the hostname resolvable from the LAN
lineinfile:
path: /etc/hosts
insertafter: '^127.0.1.1'
line: '{{ ipaddr_lan }} {{ hostname }}'
2018-05-31 18:20:51 +03:00
2018-06-04 18:00:25 +03:00
- name: add auto pxe boot entry to di-netboot-assistant
2018-05-31 18:20:51 +03:00
blockinfile:
dest: /etc/di-netboot-assistant/pxelinux.HEAD
insertbefore: EOF
block: |
TIMEOUT 100
2018-06-04 18:00:25 +03:00
LABEL autoinstall
2019-05-25 10:39:32 +03:00
MENU LABEL Debian {{ di_version }} (amd64) + preseed
2019-05-24 22:17:33 +03:00
kernel ::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux
append initrd=::/d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz auto=true priority=critical url=tftp://{{ hostname }} playbook=kiosk.yml ---
2019-05-25 10:39:32 +03:00
#LABEL daily
#MENU LABEL Debian daily (amd64) + preseed
#kernel ::/d-i/n-a/daily/amd64/linux
#append initrd=::/d-i/n-a/daily/amd64/initrd.gz auto=true priority=critical url=tftp://{{ hostname }} playbook=kiosk.yml ---
2018-06-04 18:00:25 +03:00
notify: "rebuild di-netboot-assistant menu"
- name: add auto efi boot entry to di-netboot-assistant
blockinfile:
dest: /etc/di-netboot-assistant/grub.cfg.HEAD
insertbefore: EOF
block: |
2019-05-25 10:39:32 +03:00
menuentry 'Debian {{ di_version }} (amd64) + preseed' {
linux /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/linux auto=true priority=critical url=tftp://{{ hostname }} playbook=kiosk.yml ---
2019-05-24 22:17:33 +03:00
initrd /d-i/n-pkg/images/{{ di_version }}/amd64/text/debian-installer/amd64/initrd.gz
2018-06-04 18:00:25 +03:00
}
2019-05-25 10:39:32 +03:00
#menuentry 'Debian daily (amd64) + preseed' {
# linux /d-i/n-a/daily/amd64/linux auto=true priority=critical url=tftp://{{ hostname }} playbook=kiosk.yml ---
2019-05-25 10:39:32 +03:00
# initrd /d-i/n-a/daily/amd64/initrd.gz
#}
2018-05-31 18:20:51 +03:00
notify: "rebuild di-netboot-assistant menu"