ansible-install-server/roles/fai/tasks/fai-pxe.yml

33 lines
594 B
YAML

- name: test pxe config already exists
stat:
path: /srv/tftp/fai
register: fai_tftp
- name: generate tftp config
shell: fai-chboot -IF -u http://{{server_ip}}/fai/config.tar default
when: fai_tftp.changed
tags:
- fai
- pxe
- http
- name: ensure fai dir exists
file:
path: /srv/tftp/fai
owner: root
group: root
mode: 0755
- name: copy dban image
copy:
src: files/dban/dban.bzi
dest: /srv/tftp/fai/dban.bzi
owner: root
group: root
- include: fai-pxe-ipxe.yml
when: use_ipxe
- include: fai-pxe-pxelinux.yml
when: not use_ipxe