From 2d713268a38c48d2fe51a05e602265fd304240d7 Mon Sep 17 00:00:00 2001 From: Yolanda Robla Date: Tue, 12 Jan 2016 10:13:21 +0100 Subject: [PATCH] Allow to populate the domain setting of dnsmasq As shown in documentation: this is optional, but if it is set, it does the following things. 1) Allows DHCP hosts to have fully qualified domain names, as long as the domain part matches this setting. 2) Sets the "domain" DHCP option thereby potentially setting the domain of all systems configured by DHCP 3) Provides the domain part for "expand-hosts" Under certain cases, have FQDN in servers is a need. Change-Id: Id8a109984c13e95841d9e0f283d55261d083542c --- playbooks/roles/bifrost-ironic-install/README.md | 3 +++ .../templates/dnsmasq.conf.j2 | 3 +++ .../populate_domain_dnsmasq-5408896247eb39b4.yaml | 14 ++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 releasenotes/notes/populate_domain_dnsmasq-5408896247eb39b4.yaml diff --git a/playbooks/roles/bifrost-ironic-install/README.md b/playbooks/roles/bifrost-ironic-install/README.md index be36a3d01..9d18c28ca 100644 --- a/playbooks/roles/bifrost-ironic-install/README.md +++ b/playbooks/roles/bifrost-ironic-install/README.md @@ -143,6 +143,9 @@ enable_cors_credential_support: Boolean value, default false. This variable noauth mode, this realistically should not be modified. +domain: String value, default to false. If set, domain setting is configured + in dnsmasq. + ### Hardware Inspection Support Bifrost also supports the installation of ironic-inspector in standalone diff --git a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 index 96656bad3..18b1c6626 100644 --- a/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 +++ b/playbooks/roles/bifrost-ironic-install/templates/dnsmasq.conf.j2 @@ -142,6 +142,9 @@ dhcp-hostsfile=/etc/dnsmasq.d/bifrost.dhcp-hosts.d # domain of all systems configured by DHCP # 3) Provides the domain part for "expand-hosts" #domain=thekelleys.org.uk +{% if domain is defined %} +domain={{ domain }} +{% endif %} # Set a different domain for a particular subnet #domain=wireless.thekelleys.org.uk,192.168.2.0/24 diff --git a/releasenotes/notes/populate_domain_dnsmasq-5408896247eb39b4.yaml b/releasenotes/notes/populate_domain_dnsmasq-5408896247eb39b4.yaml new file mode 100644 index 000000000..039f7d813 --- /dev/null +++ b/releasenotes/notes/populate_domain_dnsmasq-5408896247eb39b4.yaml @@ -0,0 +1,14 @@ +--- +features: + - Allow to populate the domain setting of + dnsmasq. As shown in documentation: this is optional, + but if it is set, it does the following things. + 1) Allows DHCP hosts to have fully qualified domain + names, as long as the domain part matches this setting. + 2) Sets the "domain" DHCP option thereby potentially + setting the domain of all systems configured by DHCP. + 3) Provides the domain part for "expand-hosts" +other: + - The role will accept the ``domain`` setting. If that's + present, it will be populated to equivalent domain + setting in dnsmasq.conf