Skip to content

Install dnsmasq and configure it entirely through ansible variables.

License

Notifications You must be signed in to change notification settings

AerisCloud/ansible-dnsmasq-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aeriscloud.dnsmasq-template

Install dnsmasq and configure it entirely through ansible variables.

Requirements

None

Dependencies

None

Example Playbooks

Simple DNS setup

- hosts: all
  roles:
    - role: aeriscloud.dnsmasq-template
      dnsmasq_servers:
        - 8.8.8.8
        - "/consul.domain/{{ consul_ip }}#8600"
      dnsmasq_addresses:
        - "/mydomain.local/{{ some_machine_ip }}"

Simple DHCP setup

- hosts: all
  roles:
    - role: aeriscloud.dnsmasq-template
      dnsmasq_no_resolv: true
      dnsmasq_no_poll: true
      dnsmasq_servers:
        - 8.8.8.8
        - 8.8.4.4
      dnsmasq_except_interface: ppp0
      dnsmasq_dhcp_range: 192.168.1.50,192.168.1.150,12h
      dnsmasq_read_ethers: true

Role Variables

The role comes with a template that maps variables to the actual dnsmasq configuration 1:1, but in some cases it might be overcomplex or too many variables to setup, in which case you can override the dnsmasq_template variable to point to your own template.

variable type
dnsmasq_template string

The only special cases are dnsmasq_dnsseq and entries that can have multiple values, in which case you will get a singular version that spawns only one line of it, and a plural version that is expected to be an array.

variable type
dnsmasq_port string
dnsmasq_domain_needed bool
dnsmasq_bogus_priv bool
dnsmasq_dnsseq this is actually a string that should point to your conf-file
dnsmasq_dnsseq_check_unsigned bool
dnsmasq_filterwin2k bool
dnsmasq_resolv_file string
dnsmasq_strict_order bool
dnsmasq_no_resolv bool
dnsmasq_no_poll bool
dnsmasq_servers array(string)
dnsmasq_locals array(string)
dnsmasq_addresses array(string)
dnsmasq_ipsets array(string)
dnsmasq_aliases array(string)
dnsmasq_user string
dnsmasq_group string
dnsmasq_interface string
dnsmasq_interfaces array(string)
dnsmasq_except_interface string
dnsmasq_except_interfaces array(string)
dnsmasq_listen_address string
dnsmasq_listen_addresses array(string)
dnsmasq_no_dhcp_interface string
dnsmasq_no_dhcp_interfaces array(string)
dnsmasq_bind_interfaces bool
dnsmasq_no_hosts bool
dnsmasq_addn_hosts string
dnsmasq_expand_hosts bool
dnsmasq_domain string
dnsmasq_domains array(string)
dnsmasq_dhcp_range string
dnsmasq_dhcp_ranges array(string)
dnsmasq_enable_ra bool
dnsmasq_dhcp_host string
dnsmasq_dhcp_hosts array(string)
dnsmasq_dhcp_ignore string
dnsmasq_dhcp_ignores array(string)
dnsmasq_dhcp_vendorclass string
dnsmasq_dhcp_vendorclasses array(string)
dnsmasq_dhcp_userclass string
dnsmasq_dhcp_userclasses array(string)
dnsmasq_dhcp_mac string
dnsmasq_dhcp_macs array(string)
dnsmasq_read_ethers bool
dnsmasq_dhcp_option string
dnsmasq_dhcp_options array(string)
dnsmasq_dhcp_option_force string
dnsmasq_dhcp_option_forces array(string)
dnsmasq_dhcp_boot string
dnsmasq_dhcp_boots array(string)
dnsmasq_dhcp_match string
dnsmasq_dhcp_matches array(string)
dnsmasq_dhcp_lease_max string
dnsmasq_dhcp_leasefile string
dnsmasq_dhcp_authoritative bool
dnsmasq_dhcp_script string
dnsmasq_pxe_prompt string
dnsmasq_pxe_service string
dnsmasq_pxe_services array(string)
dnsmasq_enable_tftp bool
dnsmasq_tftp_root string
dnsmasq_tftp_no_fail bool
dnsmasq_tftp_secure bool
dnsmasq_tftp_no_blocksize bool
dnsmasq_cache_size string
dnsmasq_no_negcache bool
dnsmasq_local_ttl string
dnsmasq_bogus_nxdomain string
dnsmasq_bogus_nxdomains array(string)
dnsmasq_mx_hosts array(string)
dnsmasq_mx_target string
dnsmasq_localmx bool
dnsmasq_selfmx bool
dnsmasq_srv_hosts array(string)
dnsmasq_ptr_records array(string)
dnsmasq_txt_records array(string)
dnsmasq_cnames array(string)
dnsmasq_log_queries bool
dnsmasq_log_dhcp bool
dnsmasq_conf_file string
dnsmasq_conf_files array
dnsmasq_conf_dir string
dnsmasq_conf_dirs array

License

MIT

Author Information

Christophe Robin [email protected]

About

Install dnsmasq and configure it entirely through ansible variables.

Resources

License

Stars

Watchers

Forks

Packages

No packages published