diff --git a/defaults/main.yml b/defaults/main.yml index 828454ab..22df7449 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -163,10 +163,10 @@ ironic_conductor_apt_packages: - python-yaml - open-iscsi - ipmitool + - tftpd-hpa ironic_conductor_standalone_apt_packages: - isc-dhcp-server - - tftpd-hpa ## RabbitMQ info ironic_rabbitmq_userid: ironic diff --git a/tasks/ironic_conductor_post_install.yml b/tasks/ironic_conductor_post_install.yml index 3ba1a2dd..2dce0660 100644 --- a/tasks/ironic_conductor_post_install.yml +++ b/tasks/ironic_conductor_post_install.yml @@ -34,8 +34,8 @@ - tftpd-hpa - name: Copy in tftpd-hpa config file - copy: - src: tftpd-hpa + template: + src: tftpd-hpa.j2 dest: /etc/default/tftpd-hpa notify: - Restart tftpd-hpa diff --git a/templates/ironic.conf.j2 b/templates/ironic.conf.j2 index bf123db7..329629b8 100644 --- a/templates/ironic.conf.j2 +++ b/templates/ironic.conf.j2 @@ -134,6 +134,7 @@ pool_max_size = {{ ironic_wsgi_processes }} [oslo_policy] [pxe] +tftp_server = {{ ironic_tftp_server_address }} [seamicro] diff --git a/files/tftpd-hpa b/templates/tftpd-hpa.j2 similarity index 66% rename from files/tftpd-hpa rename to templates/tftpd-hpa.j2 index 37b94c86..b683ea35 100644 --- a/files/tftpd-hpa +++ b/templates/tftpd-hpa.j2 @@ -1,4 +1,4 @@ TFTP_USERNAME="tftp" TFTP_DIRECTORY="/tftpboot" -TFTP_ADDRESS="[::]:69" +TFTP_ADDRESS="{{ ironic_tftp_server_address }}:69" TFTP_OPTIONS="-vvvv --map-file /tftpboot/map-file"