kolla-ansible/ansible/roles/ironic/templates/ironic-pxe.json.j2
Mark Goddard 922eb494e6 Make Ironic inspector honour inventory
Ironic inspector should honour the Ansible inventory group
ironic-inspector. Ironic inspector may not be required at all. If
Ironic inspector is required then it should only run on a single
node, and this should be reflected by the inventory.

This change makes a number of Ironic inspector-related tasks dependent
upon the host's membership of the ironic-inspector group. Also, we
couple the ironic-dnsmasq container with the ironic-inspector group
rather than ironic-conductor, as the service is for inspector rather
than Ironic.

Change-Id: Ifd90753b0fe1a55c11b7723c28e1d14ab3d32737
Closes-Bug: #1665257
2017-07-19 08:24:21 +01:00

33 lines
995 B
Django/Jinja

{
"command": "/usr/sbin/in.tftpd --verbose --foreground --user root --address 0.0.0.0:69 --map-file /map-file /tftpboot",
"config_files": [
{% if groups['ironic-inspector'] | length > 0 %}
{
"source": "{{ container_config_directory }}/ironic-agent.kernel",
"dest": "/tftpboot/ironic-agent.kernel",
"owner": "root",
"perm": "0644"
},
{
"source": "{{ container_config_directory }}/ironic-agent.initramfs",
"dest": "/tftpboot/ironic-agent.initramfs",
"owner": "root",
"perm": "0644"
},
{
"source": "{{ container_config_directory }}/default",
"dest": "/tftpboot/pxelinux.cfg/default",
"owner": "root",
"perm": "0644"
}
{% endif %}
],
"permissions": [
{
"path": "/tftpboot/pxelinux.cfg",
"owner": "ironic:ironic",
"recurse": true
}
]
}