Add ldlinux.c32 to the tftp directory

This patch adds a task to copy ldlinux.c32 to the tftp directory
when on ubuntu 16.04. Also, changed the copy tasks to a unique
task making use of the copy module with 'remote_src: True'.

Change-Id: I4a71c198ad11d293e15f8a80bc1dcd0c6e6aa479
This commit is contained in:
Flávio Ramalho 2016-11-29 11:03:28 -03:00
parent 40f6211041
commit 1ed97c1a37
3 changed files with 19 additions and 25 deletions

View File

@ -15,8 +15,8 @@
- name: Copy in sample dhcpd.conf file
copy:
src: dhcpd.conf
dest: /etc/dhcp/
src: "dhcpd.conf"
dest: "/etc/dhcp/"
when: ironic_standalone
notify:
- Restart isc-dhcp-server
@ -31,30 +31,21 @@
- name: Copy in tftpd-hpa config file
template:
src: tftpd-hpa.j2
dest: /etc/default/tftpd-hpa
src: "tftpd-hpa.j2"
dest: "/etc/default/tftpd-hpa"
notify:
- Restart tftpd-hpa
- name: Copy in tftpd-hpa map file
copy:
src: map-file
dest: /tftpboot/map-file
src: "map-file"
dest: "/tftpboot/map-file"
notify:
- Restart 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 {{ ironic_pxelinux_path }} /tftpboot/pxelinux.0"
changed_when: false
## 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 {{ ironic_chainc32_path }} /tftpboot/chain.c32"
changed_when: false
- name: Copy library modules into /tftpboot
copy:
src: "{{ item }}"
dest: "/tftpboot/"
remote_src: True
with_items: "{{ ironic_library_modules_paths }}"

View File

@ -38,5 +38,6 @@ ironic_conductor_distro_packages:
ironic_conductor_standalone_distro_packages:
- isc-dhcp-server
ironic_pxelinux_path: "/usr/lib/syslinux/pxelinux.0"
ironic_chainc32_path: "/usr/lib/syslinux/chain.c32"
ironic_library_modules_paths:
- "/usr/lib/syslinux/pxelinux.0"
- "/usr/lib/syslinux/chain.c32"

View File

@ -40,5 +40,7 @@ ironic_conductor_distro_packages:
ironic_conductor_standalone_distro_packages:
- isc-dhcp-server
ironic_pxelinux_path: "/usr/lib/PXELINUX/pxelinux.0"
ironic_chainc32_path: "/usr/lib/syslinux/modules/efi64/chain.c32"
ironic_library_modules_paths:
- "/usr/lib/PXELINUX/pxelinux.0"
- "/usr/lib/syslinux/modules/efi64/chain.c32"
- "/usr/lib/syslinux/modules/bios/ldlinux.c32"