Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mrlesmithjr/ansible-isc-dhcp
https://github.com/mrlesmithjr/ansible-isc-dhcp
ansible isc-dhcp
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/mrlesmithjr/ansible-isc-dhcp
- Owner: mrlesmithjr
- License: mit
- Created: 2015-08-05T19:09:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T12:55:11.000Z (about 6 years ago)
- Last Synced: 2023-03-14T12:40:35.411Z (over 1 year ago)
- Topics: ansible, isc-dhcp
- Size: 34.2 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-isc-dhcp
An [Ansible](https://www.ansible.com) role to install/configure [ISC-DHCP](https://www.isc.org/downloads/dhcp/) server(s)
- Configurable options
- Failover and load balancing ready## Requirements
### Scopes
Define your DHCP Scopes
```yaml
isc_dhcp_scopes:
- subnet: 192.168.250.0
default_lease_time: "{{ isc_dhcp_default_lease_time }}"
max_lease_time: "{{ isc_dhcp_max_lease_time }}"
netmask: 255.255.255.0
# Define scope specific options to configure
options:
- name: routers
value: 192.168.250.1
- name: subnet-mask
value: 255.255.255.0
- name: broadcast-address
value: 192.168.250.255
- name: domain-name-servers
value: "{{ isc_dhcp_name_servers|join (', ') }}"
range_start: 192.168.250.128
range_end: 192.168.250.224
```### Failover scopes
For failover define the following vars to fit your deployment...
```yaml
isc_dhcp_failover_info:
# ansible_default_ipv4.address|ansible_enp0s8.ipv4.address
# Defines failover address for dhcp failover setup
failover_address: "{{ ansible_default_ipv4.address }}"
# Define Ansible inventory group that nodes belong to
failover_group: dhcp-nodes
# Define the node in which should be considered the primary
primary: "{{ groups['dhcp-nodes'][0] }}"
# Define the port to be used on primary node
primary_port: "519"
# Define the node in which should be considered the secondary
secondary: "{{ groups['dhcp-nodes'][1] }}"
# Define the port to be used on secondary node
secondary_port: "520"
```## Role Variables
[defaults/main.yml](defaults/main.yml)
## Dependencies
None
## Example Playbook
```yaml
---
- hosts: dhcp-nodes
vars:
isc_dhcp_scopes:
- subnet: 192.168.250.0
default_lease_time: "{{ isc_dhcp_default_lease_time }}"
max_lease_time: "{{ isc_dhcp_max_lease_time }}"
netmask: 255.255.255.0
# Define scope specific options to configure
options:
- name: routers
value: 192.168.250.1
- name: subnet-mask
value: 255.255.255.0
- name: broadcast-address
value: 192.168.250.255
- name: domain-name-servers
value: "{{ isc_dhcp_name_servers|join (', ') }}"
range_start: 192.168.250.128
range_end: 192.168.250.224
roles:
- role: ansible-isc-dhcp
```## License
MIT
## Author Information
Larry Smith Jr.
- [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)
- [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)
-