{"id":21400312,"url":"https://github.com/oefenweb/ansible-dnsmasq","last_synced_at":"2025-07-31T13:34:04.650Z","repository":{"id":49115188,"uuid":"56230032","full_name":"Oefenweb/ansible-dnsmasq","owner":"Oefenweb","description":"Ansible role to set up Dnsmasq in Debian-like systems","archived":false,"fork":false,"pushed_at":"2024-04-19T16:56:50.000Z","size":91,"stargazers_count":27,"open_issues_count":0,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T17:49:34.179Z","etag":null,"topics":["ansible","debian","dns","dnsmasq","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oefenweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-14T10:55:42.000Z","updated_at":"2024-10-13T17:19:33.000Z","dependencies_parsed_at":"2023-02-08T19:00:22.937Z","dependency_job_id":"797d572d-6d64-4d7a-b25f-ceac3f4562b6","html_url":"https://github.com/Oefenweb/ansible-dnsmasq","commit_stats":null,"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"purl":"pkg:github/Oefenweb/ansible-dnsmasq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-dnsmasq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-dnsmasq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-dnsmasq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-dnsmasq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oefenweb","download_url":"https://codeload.github.com/Oefenweb/ansible-dnsmasq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oefenweb%2Fansible-dnsmasq/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268047954,"owners_count":24187210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-31T02:00:08.723Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","debian","dns","dnsmasq","ubuntu"],"created_at":"2024-11-22T15:20:57.712Z","updated_at":"2025-07-31T13:34:04.622Z","avatar_url":"https://github.com/Oefenweb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n## dnsmasq\n\n[![CI](https://github.com/Oefenweb/ansible-dnsmasq/workflows/CI/badge.svg)](https://github.com/Oefenweb/ansible-dnsmasq/actions?query=workflow%3ACI)\n[![Ansible Galaxy](http://img.shields.io/badge/ansible--galaxy-dnsmasq-blue.svg)](https://galaxy.ansible.com/Oefenweb/dnsmasq/)\n\nSet up [Dnsmasq](http://www.thekelleys.org.uk/dnsmasq/doc.html) in Debian-like systems.\n\n#### Requirements\n\nNone\n\n#### Variables\n\n* `dnsmasq_service_state`: [default: `started`]: The state of th service (e.g. `stopped`)\n* `dnsmasq_service_enabled`: [default: `true`]: Whether the service should start on boot\n\n* `dnsmasq_service_resolved_disabled`: [default: `false`]: Whether the service `systemd-resolved` should be disabled\n\n* `dnsmasq_etc_default_domain_suffix`: [optional]: Specifies the domain which hosts read from the DHCP leases file must have to be legal (e.g. `dnsdomainname`)\n* `dnsmasq_etc_default_dnsmasq_opts`: [optional]: Options to pass to the `dnsmasq` daemon (e.g. `--conf-file=/etc/dnsmasq.alt`)\n* `dnsmasq_etc_default_config_dir`: [default: `/etc/dnsmasq.d,.dpkg-dist,.dpkg-old,.dpkg-new`]: Searches this drop directory for configuration options (leave empty to comment out)\n* `dnsmasq_etc_default_ignore_resolvconf`: [optional]: If the `resolvconf` package is installed, `dnsmasq` will use its output rather than the contents of `/etc/resolv.conf` to find upstream nameservers (e.g. `true`)\n\n* `dnsmasq_etc_default`: [see: `defaults/main.yml`]: List of lines to be added to `/etc/default/dnsmasq`\n\n* `dnsmasq_dnsmasq_conf`: [default: `[]`]: List of lines to be added to `/etc/dnsmasq.conf`\n\n* `dnsmasq_dnsmasq_d_files_present`: [default: `{}`]: Declaration of specific configuration files (to add)\n* `dnsmasq_dnsmasq_d_files_present.key`: [required]: The name of the configuration file (e.g. `hosts`)\n* `dnsmasq_dnsmasq_d_files_present.key.{n}`: [default: `[]`]: List of lines of the configuration file\n\n* `dnsmasq_dnsmasq_d_files_absent`: [default: `{}`]: Specific configuration files to remove\n* `dnsmasq_dnsmasq_d_files_absent.key`: [required]: The name of the configuration file (e.g. `hosts`)\n\n## Dependencies\n\nNone\n\n#### Example\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.dnsmasq\n```\n\n#### Example with configuration (force domain to an IP address)\n\n```yaml\n---\n- hosts: all\n  roles:\n    - oefenweb.dnsmasq\n  vars:\n    dnsmasq_dnsmasq_d_files_present:\n      example-com:\n        - address=/mail.example.com/192.168.0.8\n        - address=/www.example.com/192.168.0.9\n```\n\n#### Example with configuration (caching)\n\n```yaml\n---\n- hosts: all\n  pre_tasks:\n    - name: create resolv-file for dnsmasq\n      ansible.builtin.copy:\n        content: |\n          nameserver 8.8.8.8\n          nameserver 8.8.4.4\n        dest: /etc/resolv.dnsmasq\n  roles:\n    - oefenweb.dnsmasq\n  vars:\n    dnsmasq_dnsmasq_conf:\n      - |\n        port=53\n        listen-address={{ ansible_lo['ipv4']['address'] }}\n        bind-interfaces\n    dnsmasq_dnsmasq_d_files_present:\n      cache:\n        - |\n          domain-needed\n          bogus-priv\n          no-hosts\n          dns-forward-max=150\n          cache-size=1000\n          neg-ttl=3600\n          resolv-file=/etc/resolv.dnsmasq\n          no-poll\n```\n\n#### License\n\nMIT\n\n#### Author Information\n\n* Mark van Driel\n* Mischa ter Smitten\n\n#### Feedback, bug-reports, requests, ...\n\nAre [welcome](https://github.com/Oefenweb/ansible-dnsmasq/issues)!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-dnsmasq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foefenweb%2Fansible-dnsmasq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foefenweb%2Fansible-dnsmasq/lists"}