kolla-ansible/ansible/roles/ironic/templates/ironic-ipxe.json.j2
Will Szumski 0a1ccc2612 Add support for enabling ipxe boot with ironic
When enable_ironic_ipxe is set in /etc/kolla/globals.yml,
the following happens:

- a new docker container, ironic_ipxe, is created. This contains
  an apache webserver used to serve up the boot images
- ironic is configured to use ipxe

Change-Id: I08fca1864a00afb768494406c49e968920c83ae7
Implements: blueprint ironic-ipxe
2018-05-25 08:20:47 +00:00

34 lines
1.1 KiB
Django/Jinja

{% set apache_conf_dir = 'apache2/conf-enabled' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd/conf.d' %}
{% set apache_cmd = 'apache2' if kolla_base_distro in ['ubuntu', 'debian'] else 'httpd' %}
{
"command": "{{ apache_cmd }} -DFOREGROUND",
"config_files": [
{% if groups['ironic-inspector'] | length > 0 %}
{
"source": "{{ container_config_directory }}/ironic-agent.kernel",
"dest": "/httpboot/ironic-agent.kernel",
"owner": "root",
"perm": "0644"
},
{
"source": "{{ container_config_directory }}/ironic-agent.initramfs",
"dest": "/httpboot/ironic-agent.initramfs",
"owner": "root",
"perm": "0644"
},
{
"source": "{{ container_config_directory }}/inspector.ipxe",
"dest": "/httpboot/inspector.ipxe",
"owner": "root",
"perm": "0644"
},
{% endif %}
{
"source": "{{ container_config_directory }}/httpd.conf",
"dest": "/etc/{{ apache_conf_dir }}/httpboot.conf",
"owner": "root",
"perm": "0644"
}
]
}