Last active
September 8, 2020 12:57
-
-
Save robinsmidsrod/2cfb829021bbab49d85bc3f7a5672446 to your computer and use it in GitHub Desktop.
Saltstack formulas for deplying networkboot/dhcpd docker hub image for guest network using VLAN 6
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
/srv/salt/dhcpd/green/dhcpd.conf | |
/srv/salt/dhcpd/green/netboot.conf | |
/srv/salt/dhcpd/green/option-space.conf | |
/srv/salt/dhcpd/green.sls | |
/srv/salt/dhcpd/green/static.conf | |
/srv/salt/dhcpd/green.upstart | |
/srv/salt/dhcpd/guest/dhcpd.conf | |
/srv/salt/dhcpd/guest.sls | |
/srv/salt/dhcpd/guest.upstart | |
/srv/salt/dhcpd/init.sls |
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
include: | |
- dhcpd | |
dhcpd: | |
service.running: | |
- name: dhcpd-guest | |
- enable: True | |
- require: | |
- file: dhcpd.upstart | |
dhcpd.upstart: | |
file.managed: | |
- name: /etc/init/dhcpd-guest.conf | |
- source: salt://dhcpd/guest.upstart | |
- user: root | |
- group: root | |
- mode: 644 | |
- watch_in: | |
- service: dhcpd-guest | |
- cmd: init.reload | |
dhcpd.conf.dir: | |
file.recurse: | |
- name: /etc/dhcp/guest | |
- source: salt://dhcpd/guest | |
- user: root | |
- group: root | |
- file_mode: 644 | |
- dir_mode: 755 | |
- clean: True | |
- watch_in: | |
- service: dhcpd-guest |
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
description "ISC DHCP server for guest network (VLAN 6)" | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
exec docker run --rm --name dhcpd-guest --network host -v /etc/dhcp/guest:/data networkboot/dhcpd vlan6 |
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
ddns-update-style none; | |
deny bootp; #default | |
# GUEST (private network, VLAN 6) | |
subnet 10.1.6.0 netmask 255.255.255.0 { | |
authoritative; | |
range 10.1.6.100 10.1.6.199; | |
option subnet-mask 255.255.255.0; | |
option routers 10.1.6.1; | |
default-lease-time 3600; | |
max-lease-time 86400; | |
option domain-name-servers 8.8.8.8, 8.8.4.4; | |
} |
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
include: | |
- docker | |
- init.reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment