cookbook 'dnsmasq', '= 1.1.12'
dnsmasq
(22) Versions
1.1.12
-
Follow10
Installs and configures dnsmasq
cookbook 'dnsmasq', '= 1.1.12', :supermarket
knife supermarket install dnsmasq
knife supermarket download dnsmasq
DNSMasq
Install and configure dnsmasq.
Maintainers
This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.
Recipes
default
Installs the dnsmasq
package. Depending on the [:dnsmasq][:enable_dns]
and [:dnsmasq][:enable_dhcp]
attributes it includes the dns
and dhcp
recipes respectively.
dhcp
Includes the default
recipe and writes the contents of the node[:dnsmasq][:dhcp]
attribute hash to /etc/dnsmasq.d/dhcp.conf
. Here is an example of the necessary attributes for DHCP with TFTP enabled:
'dnsmasq' => { 'enable_dhcp' => true, 'dhcp' => { 'dhcp-authoritative' => nil, 'dhcp-range' => 'eth0,10.0.0.10,10.0.0.100,12h', 'dhcp-option' => '3', #turns off everything except basic DHCP 'domain' => 'lab.atx', 'interface' => 'eth0', 'dhcp-boot' => 'pxelinux.0', 'enable-tftp' => nil, 'tftp-root' => '/var/lib/tftpboot', 'tftp-secure' => nil } }
dns
Includes the default
and manage_hostsfile
recipes, then writes the content of the node[:dnsmasq][:dns]
attribute hash to /etc/dnsmasq.d/dns.conf
.
manage_hostsfile
Loads the dnsmasq
data bag managed_hosts
item and merges it with any nodes in the [:dnsmasq][:managed_hosts]
attribute, then writes them out to /etc/hosts/
via the hosts_file
cookbook.
Usage
Data Bag
If you need manage your DNS hosts you may use the dnsmasq
data bag managed_hosts
item. It takes the form:
{ "id": "managed_hosts", "maps": { "192.168.0.100": "www.google.com", "192.168.0.101": ["www.yahoo.com", "www.altavista.com"] } }
Attributes
-
[:dnsmasq][:enable_dns]
whether to enable the DNS service, default istrue
-
[:dnsmasq][:enable_dhcp]
whether to enabled the DHCP service, default isfalse
-
[:dnsmasq][:managed_hosts]
hash of IPs and hostname/array of hostnames for themanage_hostfile
recipe, default is empty -
[:dnsmasq][:managed_hosts_bag]
name of the data bag item, default ismanaged_hosts
-
[:dnsmasq][:dhcp]
= hash of settings and values for the/etc/dnsmasq.d/dhcp.conf
, default is empty -
[:dnsmasq][:dhcp_options]
= list of options to be added to the/etc/dnsmasq.d/dhcp.conf
(ie.['dhcp-host=80:ee:73:0a:fa:d9,crushinator,10.0.0.11']
), default is empty. -
[:dnsmasq][:dns]
hash of settings and values for the/etc/dnsmasq.d/dns.conf
, defaults are
{ 'no-poll' => nil, 'no-resolv' => nil, 'server' => '127.0.0.1' }
-
[:dnsmasq][:dns_options]
= list of options to be added to the/etc/dnsmasq.d/dns.conf
, default is empty.
Testing
Please refer to the [TESTING file](TESTING.md) to see instructions for testing this cookbook.
Contributors
This project exists thanks to all the people who contribute.
Backers
Thank you to all our backers!
Sponsors
Support this project by becoming a sponsor. Your logo will show up here with a link to your website.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
CHANGELOG
This file is used to list changes made in each version of the Dnsmasq cookbooks.
1.1.12 - 2024-05-06
1.1.11 - 2023-12-21
1.1.10 - 2023-10-31
1.1.9 - 2023-09-26
- Fix typo in manage_hostsfile recipe
1.1.3 - 2023-04-01
1.1.2 - 2023-03-02
1.1.1 - 2023-02-14
- Remove delivery folder
1.1.0 - 2021-08-31
- Standardise the tested platforms
1.0.2 - 2021-08-31
- Standardise files with files in sous-chefs/repo-management
1.0.1 - 2021-06-01
- Standardise files with files in sous-chefs/repo-management
1.0.0 - 2021-05-24
- Chef 17 compatibility
- Minimum version of Chef-Infra 15.3
0.3.4
- resolved cookstyle error: recipes/dhcp.rb:8:44 convention:
Layout/TrailingWhitespace
- resolved cookstyle error: recipes/dhcp.rb:8:45 refactor:
ChefModernize/FoodcriticComments
0.3.3 - 2020-05-05
- Fix cookstyle warnings in the Dangerfile
- Migrated to github actions
[0.3.2] - 2019-08-13
- systemd-resolved conflict (fixes #35)
[0.3.1] - 2019-05-07
- Switch testing from serverspec to inspec
[0.3.0] - 2019-05-06
- Require Chef 14 as it has builtin hotfle management
- update testing harness to use ServerSpec with Test Kitchen in lieu of MiniTest
- changed to circleci for testing
- add CONTRIBUTING documentation, update TESTING and README documentation
[0.2.0] - 2013-12-23
- TFTP support
- Test Kitchen 1.0 coverage for Red Hat 5.9, 6.4, Debian 7.1 and Ubuntu 10.04, 12.04 and 13.04
- duplicate options support for dhcp and dns conf files, driven by dhcp_options and dns_options attributes
Huge thanks to @mattray!
[0.1.2] - 2013-12-23
- initial version
Collaborator Number Metric
1.1.12 passed this metric
Contributing File Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
1.1.12 passed this metric
No Binaries Metric
1.1.12 passed this metric
Testing File Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.12 passed this metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Cookstyle Metric
1.1.12 passed this metric
No Binaries Metric
1.1.12 passed this metric
Testing File Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.12 passed this metric
1.1.12 passed this metric
Testing File Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.1.12 failed this metric
1.1.12 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number