Merge "Copy required PXE files without prejudice"
This commit is contained in:
commit
c9ccde0c78
@ -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…
Reference in New Issue
Block a user