This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import re | |
| import xlsxwriter | |
| from yaml import load | |
| try: | |
| from yaml import CLoader as Loader, CDumper as Dumper | |
| except ImportError: | |
| from yaml import Loader, Dumper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| from slick53 import route53 | |
| from boto.route53.exception import DNSServerError | |
| import requests | |
| import sys | |
| from datetime import datetime | |
| # Modified from https://markcaudill.me/blog/2012/07/dynamic-route53-dns-updating-with-python/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| subnet 192.168.0.0 netmask 255.255.255.0 { | |
| range 192.168.0.100 192.168.0.200; | |
| option broadcast-address 192.168.0.255; | |
| option routers 192.168.0.1; | |
| on commit { | |
| set ClientIP = binary-to-ascii(10, 8, ".", leased-address); | |
| set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)); | |
| log(concat("Commit: IP: ", ClientIP, " Mac: ", ClientMac, "Hostname: ", host-decl-name)); | |
| execute("/usr/local/bin/dhcp-event", "commit", ClientIP, ClientMac, host-decl-name); | |
| } |