First commit, livebox without installer entry
This commit is contained in:
commit
790f0327ca
64 changed files with 931 additions and 0 deletions
1
roles/netbootinstaller/defaults/main.yml
Normal file
1
roles/netbootinstaller/defaults/main.yml
Normal file
|
@ -0,0 +1 @@
|
|||
tftp_root: "/var/lib/tftpboot"
|
15
roles/netbootinstaller/handlers/main.yml
Normal file
15
roles/netbootinstaller/handlers/main.yml
Normal file
|
@ -0,0 +1,15 @@
|
|||
- name: bind mount images
|
||||
mount:
|
||||
path: "{{ tftp_root }}/d-i/n-pkg/"
|
||||
src: /usr/lib/debian-installer/
|
||||
fstype: none
|
||||
state: mounted
|
||||
opts: bind
|
||||
listen: bind mount images
|
||||
|
||||
- name: rebuild di-netboot-assistant menu
|
||||
command: "{{ item }}"
|
||||
with_items:
|
||||
- di-netboot-assistant rebuild-menu
|
||||
- di-netboot-assistant rebuild-grub
|
||||
listen: rebuild di-netboot-assistant menu
|
30
roles/netbootinstaller/tasks/main.yml
Normal file
30
roles/netbootinstaller/tasks/main.yml
Normal file
|
@ -0,0 +1,30 @@
|
|||
- name: make preseed directory available
|
||||
file:
|
||||
path: "{{ tftp_root }}/d-i/{{ di_dist }}"
|
||||
state: directory
|
||||
mode: 0755
|
||||
|
||||
- name: install di-netboot-assistant and installer package
|
||||
apt:
|
||||
name:
|
||||
- di-netboot-assistant
|
||||
- "{{ di_pkg }}"
|
||||
state: latest # noqa package-latest
|
||||
notify:
|
||||
- bind mount images
|
||||
- rebuild di-netboot-assistant menu
|
||||
|
||||
- name: provide preseed file
|
||||
copy:
|
||||
src: /usr/share/doc/di-netboot-assistant/examples/preseed.cfg
|
||||
dest: "{{ tftp_root }}/d-i/{{ di_dist }}"
|
||||
mode: 0644
|
||||
force: false
|
||||
remote_src: true
|
||||
|
||||
- name: make the hostname resolvable from the LAN
|
||||
replace:
|
||||
path: /etc/hosts
|
||||
regexp: '^(127\.0\.1\.1.*)$'
|
||||
replace: '#\1\n{{ ipaddr_lan | ipaddr("address") }} {{ ansible_hostname }}.{{ ansible_domain }} {{ ansible_hostname }}'
|
||||
when: ipaddr_lan is defined
|
Loading…
Add table
Add a link
Reference in a new issue