Copy required PXE files without prejudice
Currently the logic that determines whether to copy in pxelinux.0 and chain.32 is broken. These files can just be copied in without the stat checks. Change-Id: I1445a60d764f02f5020e69475ae374b64cf5c4cf
This commit is contained in:
parent
f5f4621db2
commit
aca428a389
@ -51,33 +51,20 @@
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
- name: Check to see if pxlinux.0 is required
|
||||
stat: path=/tftpboot/pxelinux.0
|
||||
register: pxelinux_exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
- name: Check to see if chain.c32 is required
|
||||
stat: path=/tftpboot/chain.c32
|
||||
register: chain32_exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
- name: Check pxlinux.0 exists
|
||||
stat: path=/usr/lib/syslinux/pxelinux.0
|
||||
register: pxelinux_stat
|
||||
when: not pxelinux_exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
## TODO(odyssey4me): Switch this to the copy module and make use of
|
||||
## remote_src: True once we move to Ansible 2.x. For Ansible 1.9x
|
||||
## there is no idempotent way of doing this without several tasks
|
||||
## which is a wasted effort.
|
||||
- name: Copy syslinux pxlinux.0
|
||||
command: cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0
|
||||
when: not pxelinux_exists and pxelinux_stat.stat.exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
||||
## TODO(odyssey4me): Switch this to the copy module and make use of
|
||||
## remote_src: True once we move to Ansible 2.x. For Ansible 1.9x
|
||||
## there is no idempotent way of doing this without several tasks
|
||||
## which is a wasted effort.
|
||||
- name: Copy syslinux chain.c32
|
||||
command: cp /usr/lib/syslinux/chain.c32 /tftpboot/chain.c32
|
||||
when: not chain32_exists and chain32_stat.stat.exists
|
||||
tags:
|
||||
- tftpd-hpa
|
||||
|
Loading…
x
Reference in New Issue
Block a user