diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index 57a28fc31..234658f7b 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -193,6 +193,17 @@ inspector_store_ramdisk_logs: Boolean value, default true. Controls if the inspector agent will retain logs from the ramdisk that called the inspector service. +enable_inspector_discovery: Boolean value, default true. This instructs + inspector to add new nodes that are discovered + via PXE booting on the same network to ironic. + +inspector_default_node_driver: The default driver to utilize when adding + discovered nodes to ironic. + The default value set by bifrost is + `agent_ipmitool`. Users should change this + setting for their install environment if + an alternative default driver is required. + ### Virtual Environment Install Bifrost can install ironic into a python virtual environment using the diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 0a761f82a..e77ae74b1 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -126,6 +126,12 @@ inspector_port_addition: "pxe" # Note: inspector_keep_ports has three valid values: all, present, added inspector_keep_ports: "present" +# Inspector defaults +inspector: + discovery: + enabled: "{{ enable_inspector_discovery | default(true) }}" + default_node_driver: "{{ inspector_default_node_driver | default('agent_ipmitool')}}" + # We may not have packaged iPXE files on some distros, or may want to # download them on their own. download_ipxe: false diff --git a/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 index e8f6aee58..02303ce5e 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/ironic-inspector.conf.j2 @@ -27,11 +27,9 @@ add_ports = {{ inspector_port_addition | default('pxe') }} keep_ports = {{ inspector_keep_ports | default('present') }} ramdisk_logs_dir = {{ inspector_data_dir }}/log always_store_ramdisk_logs = {{ inspector_store_ramdisk_logs | default('true') | bool }} -{# -# Note(TheJulia): Preserving node_not_found_hook for potential future -# use by bifrost. -# The name of the hook to run when inspector receives inspection -# information from a node it isn't already aware of. This hook is -# ignored by default. (string value) -#node_not_found_hook = -#} +{% if inspector.discovery.enabled == true %} +node_not_found_hook = enroll + +[discovery] +enroll_node_driver = {{ inspector.discovery.enroll_node_driver | default('fake') }} +{% endif %} diff --git a/releasenotes/notes/enable-inspector-discovery-77aa6f5c1f1e42c6.yaml b/releasenotes/notes/enable-inspector-discovery-77aa6f5c1f1e42c6.yaml new file mode 100644 index 000000000..5fbc466c1 --- /dev/null +++ b/releasenotes/notes/enable-inspector-discovery-77aa6f5c1f1e42c6.yaml @@ -0,0 +1,6 @@ +--- +features: + - Discovery of nodes via the ironic-inspector is now + enabled by default. If you wish to disable this, set + ``enable_inspector_discovery`` to ``false`` and re-execute + the installation playbook.