Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cache-size and log configs #10

Merged
merged 1 commit into from
Feb 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ dnsmasq_nameservers:
- 8.8.4.4
- 8.8.8.8

# Define size of the dns cache
# The default is 150 names
dnsmasq_cache_size: 150

# Defines if queries should be logged
dnsmasq_log_queries: false

# Defines location of logfile
dnsmasq_log_facility: /var/log/dnsmasq.log

dnsmasq_pri_bind_address: "{{ ansible_default_ipv4['address'] }}"
dnsmasq_pri_domain_name: 'example.org'

Expand Down
7 changes: 7 additions & 0 deletions templates/etc/dnsmasq.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ domain={{ dnsmasq_pri_domain_name }}
domain={{ item['domain'] }},{{ item['network']|join (',') }}
{% endfor %}
{% endif %}
{% if dnsmasq_cache_size is defined %}
cache-size={{ dnsmasq_cache_size }}
{% endif %}
{% if dnsmasq_log_queries %}
log-queries
log-facility={{ dnsmasq_log_facility }}
{% endif %}
{% if dnsmasq_enable_forwarders %}
{% for item in dnsmasq_nameservers %}
server={{ item }}
Expand Down