Setup tftp for all scenarios

Currently tftp is only set up when ironic is setup for standalone
usage. This is incorrect. tftp is required for all use cases.

Change-Id: Ic47b71c0d9113d128d547247045a03cad4c20c82
This commit is contained in:
Michael Davies 2016-03-09 00:33:35 +00:00
parent 2bd2be25b8
commit 7c24514a3f

View File

@ -21,7 +21,7 @@
notify: notify:
- Restart isc-dhcp-server - Restart isc-dhcp-server
tags: tags:
- tftpd-hpa - isc-dhcp-server
- name: Create /tftpboot - name: Create /tftpboot
file: file:
@ -30,7 +30,6 @@
owner: "{{ ironic_system_user_name }}" owner: "{{ ironic_system_user_name }}"
group: "{{ ironic_system_group_name }}" group: "{{ ironic_system_group_name }}"
mode: "0755" mode: "0755"
when: ironic_standalone
tags: tags:
- tftpd-hpa - tftpd-hpa
@ -38,7 +37,6 @@
copy: copy:
src: tftpd-hpa src: tftpd-hpa
dest: /etc/default/tftpd-hpa dest: /etc/default/tftpd-hpa
when: ironic_standalone
notify: notify:
- Restart tftpd-hpa - Restart tftpd-hpa
tags: tags:
@ -48,7 +46,6 @@
copy: copy:
src: map-file src: map-file
dest: /tftpboot/map-file dest: /tftpboot/map-file
when: ironic_standalone
notify: notify:
- Restart tftpd-hpa - Restart tftpd-hpa
tags: tags:
@ -57,32 +54,30 @@
- name: Check to see if pxlinux.0 is required - name: Check to see if pxlinux.0 is required
stat: path=/tftpboot/pxelinux.0 stat: path=/tftpboot/pxelinux.0
register: pxelinux_exists register: pxelinux_exists
when: ironic_standalone
tags: tags:
- tftpd-hpa - tftpd-hpa
- name: Check to see if chain.c32 is required - name: Check to see if chain.c32 is required
stat: path=/tftpboot/chain.c32 stat: path=/tftpboot/chain.c32
register: chain32_exists register: chain32_exists
when: ironic_standalone
tags: tags:
- tftpd-hpa - tftpd-hpa
- name: Check pxlinux.0 exists - name: Check pxlinux.0 exists
stat: path=/usr/lib/syslinux/pxelinux.0 stat: path=/usr/lib/syslinux/pxelinux.0
register: pxelinux_stat register: pxelinux_stat
when: not pxelinux_exists and ironic_standalone when: not pxelinux_exists
tags: tags:
- tftpd-hpa - tftpd-hpa
- name: Copy syslinux pxlinux.0 - name: Copy syslinux pxlinux.0
command: cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0 command: cp /usr/lib/syslinux/pxelinux.0 /tftpboot/pxelinux.0
when: not pxelinux_exists and pxelinux_stat.stat.exists and ironic_standalone when: not pxelinux_exists and pxelinux_stat.stat.exists
tags: tags:
- tftpd-hpa - tftpd-hpa
- name: Copy syslinux chain.c32 - name: Copy syslinux chain.c32
command: cp /usr/lib/syslinux/chain.c32 /tftpboot/chain.c32 command: cp /usr/lib/syslinux/chain.c32 /tftpboot/chain.c32
when: not chain32_exists and chain32_stat.stat.exists and ironic_standalone when: not chain32_exists and chain32_stat.stat.exists
tags: tags:
- tftpd-hpa - tftpd-hpa