Skip to content

Using the Netbox Ansible inventory plugin, generate dnsmasq configs for devices who's interfaces have a dns_name set

Notifications You must be signed in to change notification settings

pvl1/ansible_netbox_dnsmasq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible DNSmasq

adapted from https://gitlab.com/fwalk/ansible-dnsmasq

Requirements

Tested with:

  • Ansible 2.14

Role Variables

See example.

Dependencies

netbox.netbox.nb_inventory

Example Playbook

Inventory:

[nameserver]
ns1 ansible_host=192.168.1.2 ansible_user=pi

[nameserver:vars]
domain=example.com

Playbook:

---
- hosts:
    - nameserver

  roles:
    - role: ansible-dnsmasq

Example Inventory
___
plugin: netbox.netbox.nb_inventory
api_endpoint: use_ssl_where_possible
token: blah
validate_certs: False
config_context: False
dns_names: true
interfaces: true
fetch_all: False
group_by:
  - tags
query_filters:
  - tag: no-dhcp
#https://github.com/p-rintz/netbox-dnsmasq
compose:
  ansible_host: display_name

License
-------

BSD

Author Information
------------------

fwalk___gitlab

About

Using the Netbox Ansible inventory plugin, generate dnsmasq configs for devices who's interfaces have a dns_name set

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages