Skip to content

Commit

Permalink
Merge pull request #10 from fpalladoro/master
Browse files Browse the repository at this point in the history
Add cache-size and log configs
  • Loading branch information
mrlesmithjr authored Feb 22, 2018
2 parents 263f150 + ce17d2d commit e96453c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
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

0 comments on commit e96453c

Please sign in to comment.