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

56 lines
2.3 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
- name: enable apt-cacher-ng for install-clients
replace:
dest: "{{ tftp_root }}/d-i/{{ di_dist }}/preseed.cfg"
regexp: '^(d-i mirror/http/proxy string.*)$'
replace: 'd-i mirror/http/proxy string http://{{ hostname }}:3142/'
2018-06-04 18:00:25 +03:00
- name: make the hostname resolvable from the LAN
replace:
path: /etc/hosts
regexp: '^(127\.0\.1\.1.*)$'
replace: '#\1\n{{ 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
MENU LABEL Debian {{ di_version }} (amd64) + preseed + kiosk.yml
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 + kiosk.yml
2019-05-25 10:39:32 +03:00
#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: |
menuentry 'Debian {{ di_version }} (amd64) + preseed + kiosk.yml' {
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 + kiosk.yml' {
# 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"