{"id":19402426,"url":"https://github.com/robertdebock/ansible-role-dnsmasq","last_synced_at":"2026-02-09T10:09:30.461Z","repository":{"id":41329121,"uuid":"294885957","full_name":"robertdebock/ansible-role-dnsmasq","owner":"robertdebock","description":"Install and configure dnsmasq on your system.","archived":false,"fork":false,"pushed_at":"2026-02-04T12:09:36.000Z","size":190,"stargazers_count":9,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-04T23:48:07.631Z","etag":null,"topics":["ansible","dhcp","dns","dnsmasq","molecule","playbook","system"],"latest_commit_sha":null,"homepage":"https://robertdebock.nl/","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"robertdebock"}},"created_at":"2020-09-12T06:35:41.000Z","updated_at":"2026-02-04T12:09:40.000Z","dependencies_parsed_at":"2022-08-20T09:40:20.139Z","dependency_job_id":"af5fe1d5-4631-4809-962b-92b2a7be1f6c","html_url":"https://github.com/robertdebock/ansible-role-dnsmasq","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/robertdebock/ansible-role-dnsmasq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-dnsmasq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-dnsmasq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-dnsmasq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-dnsmasq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/ansible-role-dnsmasq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fansible-role-dnsmasq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29261651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","dhcp","dns","dnsmasq","molecule","playbook","system"],"created_at":"2024-11-10T11:23:42.610Z","updated_at":"2026-02-09T10:09:30.455Z","avatar_url":"https://github.com/robertdebock.png","language":"Jinja","funding_links":["https://github.com/sponsors/robertdebock"],"categories":[],"sub_categories":[],"readme":"# [Ansible role dnsmasq](#ansible-role-dnsmasq)\n\nInstall and configure dnsmasq on your system.\n\n|GitHub|GitLab|Downloads|Version|\n|------|------|---------|-------|\n|[![github](https://github.com/robertdebock/ansible-role-dnsmasq/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-dnsmasq/actions)|[![gitlab](https://gitlab.com/robertdebock-iac/ansible-role-dnsmasq/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-dnsmasq)|[![downloads](https://img.shields.io/ansible/role/d/robertdebock/dnsmasq)](https://galaxy.ansible.com/robertdebock/dnsmasq)|[![Version](https://img.shields.io/github/release/robertdebock/ansible-role-dnsmasq.svg)](https://github.com/robertdebock/ansible-role-dnsmasq/releases/)|\n\n## [Example Playbook](#example-playbook)\n\nThis example is taken from [`molecule/default/converge.yml`](https://github.com/robertdebock/ansible-role-dnsmasq/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.\n\n```yaml\n---\n- name: Converge\n  hosts: all\n  become: true\n  gather_facts: true\n\n  roles:\n    - role: robertdebock.dnsmasq\n```\n\nThe machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/robertdebock/ansible-role-dnsmasq/blob/master/molecule/default/prepare.yml):\n\n```yaml\n---\n- name: Prepare\n  hosts: all\n  become: true\n  gather_facts: false\n\n  roles:\n    - role: robertdebock.bootstrap\n```\n\nAlso see a [full explanation and example](https://robertdebock.nl/how-to-use-these-roles.html) on how to use these roles.\n\n## [Role Variables](#role-variables)\n\nThe default values for the variables are set in [`defaults/main.yml`](https://github.com/robertdebock/ansible-role-dnsmasq/blob/master/defaults/main.yml):\n\n```yaml\n---\n# defaults file for dnsmasq\n\n# dnsmasq_port: 5353\n\ndnsmasq_domain_needed: false\ndnsmasq_bogus_priv: false\ndnsmasq_conf_file: \"{{ dnsmasq_documentation_path }}/trust-anchors.conf\"\ndnsmasq_dnssec: false\ndnsmasq_dnssec_check_unsigned: false\ndnsmasq_filterwin2k: false\n# dnsmasq_resolv_file: /etc/resolv.conf\ndnsmasq_strict_order: false\ndnsmasq_no_resolv: false\ndnsmasq_no_poll: false\n# dnsmasq_servers:\n#   - domain: localnet\n#     nameserver: \"192.168.0.1\"\n#   - domain: \"3.168.192.in-addr.arpa\"\n#     nameserver: \"10.1.2.3\"\n#   - domain: \"10.1.2.3\"\n#     interface: eth1\n#   - destination: \"10.2.3.4\"\n#     nameserver: \"192.168.1.1\"\n#     interface: \"192.168.1.1\"\n#     port: 55\n# dnsmasq_locals:\n#   - domain: localnet\n# dnsmasq_addresses:\n#   - domain: double-click.net\n#     address: \"127.0.0.1\"\n#   - domain: www.thekelleys.org.uk\n#     address: \"fe80::20d:60ff:fe36:f83\"\n# dnsmasq_ipsets:\n#   - domains:\n#       - name: yahoo.com\n#       - name: google.com\n#     destination: vpn\n#     option: search\ndnsmasq_user: \"{{ dnsmasq_set_user }}\"\ndnsmasq_group: \"{{ dnsmasq_set_group }}\"\n# dnsmasq_interfaces:\n#   - name: lo\n#   - name: eth0\n# dnsmasq_except_interface: eth0\n# dnsmasq_listen_addresses:\n#   - name: \"127.0.0.1\"\ndnsmasq_no_dhcp_interface: \"\"\ndnsmasq_local_service: false\ndnsmasq_bind_interfaces: false\ndnsmasq_no_hosts: false\n# dnsmasq_addn_hosts: /etc/banner_add_hosts\ndnsmasq_expand_hosts: false\n# dnsmasq_domains:\n#   - name: thekelleys.org.uk\n#   - name: wireless.thekelleys.org.uk\n#     subnet: \"192.168.2.0/24\"\n#   - name: reserved.thekelleys.org.uk\n#     from: \"192.68.3.100\"\n#     until: \"192.168.3.200\"\n# dnsmasq_dhcp_ranges:\n#   - from: \"192.168.0.50\"\n#     until: \"192.168.0.150\"\n#     leasetime: 12h\n#   - from: \"192.168.0.50\"\n#     until: \"192.168.0.150\"\n#     subnet: \"255.255.255.0\"\n#     leasetime: 12h\n#   - from: \"192.168.0.50\"\n#     until: \"192.168.0.150\"\n#     sets:\n#       - name: red\n#   - from: \"192.168.0.50\"\n#     until: \"192.168.0.150\"\n#     leasetime: 12h\n#     tags:\n#       - name: green\n#   - from: \"192.168.0.0\"\n#     options:\n#       - name: static\n#     static: true\n#   - from: \"1234::2\"\n#     until: \"1234::500\"\n#     prefix: 64\n#     leasetime: 12h\n#   - from: \"1234::\"\n#     options:\n#       - name: ra-only\n#   - from: \"1234::\"\n#     options:\n#       - name: ra-names\n#   - from: \"1234::\"\n#     options:\n#       - name: ra-only\n#     leasetime: 48hA\n#   - from: \"1234::2\"\n#     until: \"1234::500\"\n#     options:\n#       - name: slaac\n#   - from: \"1234::\"\n#     options:\n#        - name: ra-stateless\n#   - from: \"1234::\"\n#     options:\n#       - name: ra-stateless\n#       - name: ra-names\ndnsmasq_enable_ra: false\ndnsmasq_hosts: []\n# dnsmasq_hosts:\n#   - name: \"11:22:33:44:55:66\"\n#     value: \"192.168.0.60\"\n#   - name: \"11:22:33:44:55:66\"\n#     value: fred\n#   - name: \"11:22:33:44:55:66\"\n#     value: \"fred,192.168.0.60,45m\"\n#   - name: \"11:22:33:44:55:66,12:34:56:78:90:12\"\n#     value: \"192.168.0.60\"\n#   - name: bert\n#     value: \"192.168.0.70,infinite\"\n#   - name: \"id:01:02:02:04\"\n#     value: \"192.168.0.60\"\n#   - name: \"id:ff:00:00:00:00:00:02:00:00:02:c9:00:f4:52:14:03:00:28:05:81\"\n#     value: \"192.168.0.61\"\n# dnsmasq_dhcp_ignore: \"tag:!known\"\n# dnsmasq_dhcp_vendorclass: \"set:red,Linux\"\n# dnsmasq_dhcp_userclass: \"set:red,accounts\"\ndnsmasq_dhcp_mac: \"set:red,00:60:8C:*:*:*\"\ndnsmasq_read_ethers: false\n# dnsmasq_dhcp_options:\n#   - name: 3\n#     value: \"1.2.3.4\"\n#   - name: \"option:router\"\n#     value: \"1.2.3.4\"\n#   - name: 3\n#   - name: \"option:ntp-server\"\n#     value: \"192.168.0.4,10.10.0.5\"\n#   - name: \"option6:dns-server\"\n#     value: \"[1234::77],[1234::88]\"\n#   - name: \"option6:dns-server\"\n#     value: \"[::],[1234::88]\"\n#   - name: \"option6:information-refresh-time\"\n#     value: 6h\n#   - name: \"option:T1\"\n#     value: 1m\n#   - name: \"option:T2\"\n#     value: 2m\n#   - name: 42\n#     value: \"0.0.0.0\"\n#   - name: 40\n#     value: welly\n#   - name: 23\n#     value: 50\n#   - name: 27\n#     value: 1\n#   - name: 128\n#     value: \"e4:45:74:68:00:00\"\n#   - name: 129\n#     value: NIC=eepro100\n#   - name: \"option:ntp-server\"\n#     tag: red\n#     value: \"192.168.1.1\"\n#   - name: 19\n#     value: 0\n#   - name: 44\n#     value: \"0.0.0.0\"\n#   - name: 45\n#     value: \"0.0.0.0\"\n#   - name: 46\n#     value: 8\n#   - name: 252\n#     value: \"\\n\"\n#   - name: \"option:domain-search\"\n#     value: eng.apple.com,marketing.apple.com\n#   - name: 121\n#     value: \"192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8\"\n#   - name: \"vendor:PXEClient\"\n#     value: \"1,0.0.0.0\"\n#   - name: \"vendor:MSFT\"\n#     value: 2,1i\n#   - name: \"vendor:Etherboot\"\n#     value: 60,\"Etherboot\"\n# dnsmasq_dhcp_option_force:\n#   - name: 208\n#     value: \"f1:00:74:7e\"\n#   - name: 209\n#     value: configs/common\n#   - name: 210\n#     value: /tftpboot/pxelinux/files/\n#   - name: 211\n#     value: 30i\n# dnsmasq_dhcp_boot: pxelinux.0\n# dnsmasq_dhcp_boot: \"pxelinux.0,server.name,192.168.1.100\"\ndnsmasq_enable_tftp: false\n# dnsmasq_tftp_root: /var/ftpd\ndnsmasq_tftp_no_fail: false\ndnsmasq_tftp_secure: false\ndnsmasq_tftp_no_blocksize: false\n# dnsmasq_dhcp_lease_max: 150\n# dnsmasq_dhcp_leasefile: /var/lib/dnsmasq/dnsmasq.leases\ndnsmasq_dhcp_authoritative: false\ndnsmasq_dhcp_rapid_commit: false\ndnsmasq_dhcp_script: /bin/echo\n# dnsmasq_cache_size: 150\ndnsmasq_no_negcache: false\n# dnsmasq_local_ttl: 3600\n# dnsmasq_bogus_nxdomain: \"64.94.110.11\"\n# dnsmasq_aliases:\n#   - from: \"1.2.3.4\"\n#     until: \"4.5.6.7\"\n#   - from: \"1.2.3.0\"\n#     until: \"5.6.7.0\"\n#     subnet: \"255.255.255.0\"\n#   - from: \"192.168.0.10-192.168.0.40\"\n#     until: \"10.0.0.0\"\n#     subnet: \"255.255.255.0\"\n# dnsmasq_mx_hosts:\n#   - domain: maildomain.com\n#     host: servermacine.com\n#     priority: 50\n#   - domain: servermachine.com\ndnsmasq_localmx: false\ndnsmasq_selfmx: false\n# dnsmasq_src_hosts:\n#   - record: _ldap._tcp.example.com\n#     destination: ldapserver.example.com\n#     port: 389\n#   - record: _ldap._tcp.example.com\n#     destination: ldapserver.example.com\n#     port: 389\n#     priority: 1\n#   - record: _ldap._tcp.example.com\n#     destination: ldapserver.example.com\n#     port: 389\n#     priority: 2\n#   - record: _ldap._tcp.example.com\ndnsmasq_log_queries: false\ndnsmasq_log_dhcp: false\n# dnsmasq_conf_dir: /etc/dnsmasq.d\n# dnsmasq_dhcp_name_match: \"set:wpad-ignore,wpad\"\n# dnsmasq_ignore_names: \"tag:wpad-ignore\"\n```\n\n## [Requirements](#requirements)\n\n- pip packages listed in [requirements.txt](https://github.com/robertdebock/ansible-role-dnsmasq/blob/master/requirements.txt).\n\n## [State of used roles](#state-of-used-roles)\n\nThe following roles are used to prepare a system. You can prepare your system in another way.\n\n| Requirement | GitHub | GitLab |\n|-------------|--------|--------|\n|[robertdebock.bootstrap](https://galaxy.ansible.com/robertdebock/bootstrap)|[![Build Status GitHub](https://github.com/robertdebock/ansible-role-bootstrap/workflows/Ansible%20Molecule/badge.svg)](https://github.com/robertdebock/ansible-role-bootstrap/actions)|[![Build Status GitLab](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap/badges/master/pipeline.svg)](https://gitlab.com/robertdebock-iac/ansible-role-bootstrap)|\n\n## [Context](#context)\n\nThis role is part of many compatible roles. Have a look at [the documentation of these roles](https://robertdebock.nl/) for further information.\n\nHere is an overview of related roles:\n![dependencies](https://raw.githubusercontent.com/robertdebock/ansible-role-dnsmasq/png/requirements.png \"Dependencies\")\n\n## [Compatibility](#compatibility)\n\nThis role has been tested on these [container images](https://hub.docker.com/u/robertdebock):\n\n|container|tags|\n|---------|----|\n|[Alpine](https://hub.docker.com/r/robertdebock/alpine)|all|\n|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|\n|[EL](https://hub.docker.com/r/robertdebock/enterpriselinux)|9|\n|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all|\n|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|\n\nThe minimum version of Ansible required is 2.12, tests have been done on:\n\n- The previous version.\n- The current version.\n- The development version.\n\nIf you find issues, please register them on [GitHub](https://github.com/robertdebock/ansible-role-dnsmasq/issues).\n\n## [License](#license)\n\n[Apache-2.0](https://github.com/robertdebock/ansible-role-dnsmasq/blob/master/LICENSE).\n\n## [Author Information](#author-information)\n\n[robertdebock](https://robertdebock.nl/)\n\nPlease consider [sponsoring me](https://github.com/sponsors/robertdebock).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-dnsmasq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fansible-role-dnsmasq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fansible-role-dnsmasq/lists"}