Fix check for >= Ubuntu 14.10

In the ironic-install role, we currently only check the
ansible_distribution_version to determine where to source pxelinux.0,
but the check is clearly Ubuntu-specific. The check needs to be modified
to work correctly on other distros.

Change-Id: I553f1c3cfe70afa2f8d1c6fbf73cb7cab375b4fa
Closes-Bug: #1471973
This commit is contained in:
stephane 2015-07-06 17:55:13 -07:00
parent 2577caad01
commit daf6e48c93

View File

@ -23,14 +23,12 @@
copy: src=tftpboot-map-file dest=/tftpboot/map-file owner=ironic group=ironic
- name: "Disable service tftpd-hpa"
service: name=tftpd-hpa state=stopped enabled=no
# NOTE(cinerama) See https://bugs.launchpad.net/bifrost/+bug/1471973
# with regard to the next two tasks.
- name: "Placing pxelinux.0 (pre-14.10)"
- name: "Set pxelinux.0 source (for Ubuntu >=14.10)"
set_fact:
syslinux_tftp_dir: '/usr/lib/PXELINUX'
when: ansible_distribution == 'Ubuntu' and ansible_distribution_version|version_compare('14.10', '>=')
- name: "Placing pxelinux.0"
copy: src={{ syslinux_tftp_dir }}/pxelinux.0 dest=/tftpboot
when: ansible_distribution_version|version_compare('14.10', '<')
- name: "Placing pxelinux.0 (>=14.10)"
copy: src=/usr/lib/PXELINUX/pxelinux.0 dest=/tftpboot
when: ansible_distribution_version|version_compare('14.10', '>=')
- name: "Place boot.ipxe helper script to HTTP root"
copy: src=boot.ipxe dest=/httpboot/boot.ipxe
- name: "Place tftp config file"