Commit 90e80bb3 authored by Stefano Rivera's avatar Stefano Rivera

Throw in netboot, why not :)

parent 40f67ba9
---
netboot_image: https://deb.debian.org/debian/dists/stretch/main/installer-amd64/current/images/netboot/netboot.tar.gz
late_command_url: https://anonscm.debian.org/cgit/debconf-video/ansible.git/plain/setup_ansible.sh
apt_proxy: ""
domain: video.debconf.org
time_zone: Europe/Paris
user_name: videoteam
user_password: RedPill
pw_salt: U1ESiTXUQE0tFh2r4LRl
---
- name: download TFTP boot image
get_url:
url: "{{ netboot_image }}"
dest: /srv/tftp/netboot.tar.gz
- name: extract TFTP boot image
unarchive:
src: /srv/tftp/netboot.tar.gz
dest: /srv/tftp
remote_src: true
creates: /srv/tftp/pxelinux.0
- name: write preseed.cfg
template:
src: preseed.cfg.j2
dest: /srv/tftp/preseed.cfg
- name: inject preseed into menu (find files)
find:
paths: /srv/tftp
recurse: true
patterns: txt.cfg
register: menus
- name: inject preseed into menu (do injection)
lineinfile:
dest: "{{ item.path }}"
regexp: (\s+append\s+.*\s+initrd=\S+)\s+(?!auto=true)(.*)
backrefs: true
line: \1 auto=true interface=auto url=tftp://10.20.0.1/preseed.cfg \2
with_items: "{{ menus.files }}"
This diff is collapsed.
......@@ -7,6 +7,7 @@
- hosts: dhcp-server
roles:
- dhcp-server
- tftp-server
- hosts: icecast2
roles:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment