diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 25bd65a6c6..90dbc53596 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -900,6 +900,7 @@ enable_horizon_watcher: "{{ enable_watcher | bool }}" enable_horizon_zun: "{{ enable_zun | bool }}" enable_influxdb: "{{ enable_cloudkitty | bool and cloudkitty_storage_backend == 'influxdb' }}" enable_ironic: "no" +enable_ironic_dnsmasq: "{{ enable_ironic | bool }}" enable_ironic_neutron_agent: "{{ enable_neutron | bool and enable_ironic | bool }}" enable_ironic_prometheus_exporter: "{{ enable_ironic | bool and enable_prometheus | bool }}" enable_iscsid: "{{ enable_cinder | bool and enable_cinder_backend_iscsi | bool }}" diff --git a/ansible/roles/ironic/defaults/main.yml b/ansible/roles/ironic/defaults/main.yml index 40b98bb1ee..8f5d7bc9f2 100644 --- a/ansible/roles/ironic/defaults/main.yml +++ b/ansible/roles/ironic/defaults/main.yml @@ -79,7 +79,7 @@ ironic_services: ironic-dnsmasq: container_name: ironic_dnsmasq group: ironic-inspector - enabled: true + enabled: "{{ enable_ironic_dnsmasq }}" cap_add: - NET_ADMIN - NET_RAW diff --git a/ansible/roles/ironic/tasks/precheck.yml b/ansible/roles/ironic/tasks/precheck.yml index b2f2a83d9b..03d275d2d3 100644 --- a/ansible/roles/ironic/tasks/precheck.yml +++ b/ansible/roles/ironic/tasks/precheck.yml @@ -84,4 +84,6 @@ ironic_dnsmasq_dhcp_ranges must be a list connection: local run_once: True - when: not ironic_dnsmasq_dhcp_ranges is sequence + when: + - enable_ironic_dnsmasq | bool + - not ironic_dnsmasq_dhcp_ranges is sequence diff --git a/releasenotes/notes/enable_ironic_dnsmasq-4288e3e2b5819f2d.yaml b/releasenotes/notes/enable_ironic_dnsmasq-4288e3e2b5819f2d.yaml new file mode 100644 index 0000000000..7429d630f0 --- /dev/null +++ b/releasenotes/notes/enable_ironic_dnsmasq-4288e3e2b5819f2d.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + With the ``enable_ironic_dnsmasq`` parameter it is possible + to explicitly disable the ironic-dnsmasq service. By default, + the parameter is set to the value of ``enable_ironic``.