Allow user defined extra files to be added to ironic tftp directory
Some of these files are already statically defined in the role vars, but cannot be extended. The new variable ironic_tftp_extra_content allows either local files (path:) or files from a web server (url:) to be copied into the tftp server root. A feature like this is needed to copy EFI firmware to the tftp root for ironic node CPU architectures that are different to the ironic control plane nodes. The EFI firmware is sometimes not available from the system package manager for architechtures different to the host CPU. Change-Id: Ie30c009d0704b87c2298088935a7f2ec0d55c6fb
This commit is contained in:
parent
591399a999
commit
c305af301b
@ -215,6 +215,14 @@ ironic_recreate_keys: False
|
||||
|
||||
ironic_tftp_server_address: "{{ ironic_bmaas_address }}"
|
||||
|
||||
# Use this variable to add extra files into the ironic_tftp_root directory
|
||||
# ironic_tftp_extra_content:
|
||||
# - path: /some/local/dir/local-file.txt
|
||||
# name: local-file.txt
|
||||
# - url: http://boot.ipxe.org/arm64-efi/ipxe.efi
|
||||
# name: ipxe_aa64.efi
|
||||
ironic_tftp_extra_content: []
|
||||
|
||||
ironic_pip_packages:
|
||||
- "git+{{ ironic_git_repo }}@{{ ironic_git_install_branch }}#egg=ironic"
|
||||
- cryptography
|
||||
|
@ -66,12 +66,18 @@
|
||||
owner: "ironic"
|
||||
group: "ironic"
|
||||
|
||||
- name: Copy uefi modules into tftpboot
|
||||
- name: Copy content into tftpboot (files)
|
||||
copy:
|
||||
src: "{{ item.path }}"
|
||||
dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
|
||||
remote_src: True
|
||||
with_items: "{{ ironic_uefi_modules }}"
|
||||
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('path', 'defined') | list }}"
|
||||
|
||||
- name: Copy content into tftpboot (urls)
|
||||
get_url:
|
||||
url: "{{ item.url }}"
|
||||
dest: "{{ ironic_tftpd_root }}/{{ item.name }}"
|
||||
with_items: "{{ (ironic_uefi_modules + ironic_tftp_extra_content) | selectattr('url', 'defined') | list }}"
|
||||
|
||||
- name: Start up tftp
|
||||
service:
|
||||
|
Loading…
Reference in New Issue
Block a user