From aca428a3891be34eaabe347f24379b60873108c8 Mon Sep 17 00:00:00 2001 From: Michael Davies Date: Mon, 11 Apr 2016 07:14:08 +0000 Subject: [PATCH] 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 --- tasks/ironic_conductor_post_install.yml | 29 +++++++------------------ 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/tasks/ironic_conductor_post_install.yml b/tasks/ironic_conductor_post_install.yml index 3821415a..3ba1a2dd 100644 --- a/tasks/ironic_conductor_post_install.yml +++ b/tasks/ironic_conductor_post_install.yml @@ -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