Only copy pxelinux.0 to /tftpboot if it's not there already

Add a conditional to only copy pxelinux.0 to /tftpbboot if it's
not there, which has the side effect of fixing this playbook for
Fedora 22, where pxelinux.0 gets installed to /tftpboot from the
relevant syslinux package.

Change-Id: Ib62d432cbf7e0aa3369fbf417fa8c3f2d4ca2511
Closes-Bug: 1478888
This commit is contained in:
stephane 2015-07-31 14:20:51 -07:00
parent 1d39d06160
commit 1f508fccc4

View File

@ -27,8 +27,12 @@
set_fact:
syslinux_tftp_dir: '/usr/lib/PXELINUX'
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('14.10', '>=')
- name: "Determine if pxelinux.0 is in place"
stat: path=/tftpboot/pxelinux.0
register: test_pxelinux
- name: "Placing pxelinux.0"
copy: src={{ syslinux_tftp_dir }}/pxelinux.0 dest=/tftpboot
when: test_pxelinux.stat.exists == false
- name: "Place boot.ipxe helper script to HTTP root"
copy: src=boot.ipxe dest=/httpboot/boot.ipxe
- name: "Place tftp config file"