-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Larry Smith Jr <mrlesmithjr@gmail.coml>
- Loading branch information
Larry Smith Jr
committed
May 17, 2016
1 parent
b612433
commit 082c1c4
Showing
10 changed files
with
282 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
--- | ||
# handlers file for ansible-kea-dhcp | ||
- name: "restart kea-dhcp" | ||
- name: "restart redhat kea-dhcp" | ||
service: | ||
name: "{{ item.name }}" | ||
state: "restarted" | ||
with_items: '{{ kea_dhcp_services }}' | ||
when: item.enabled | ||
with_items: '{{ kea_dhcp_redhat_services }}' | ||
when: > | ||
ansible_os_family == "RedHat" and | ||
item.enabled | ||
- name: "restart debian kea-dhcp" | ||
service: | ||
name: "{{ item.name }}" | ||
state: "restarted" | ||
with_items: '{{ kea_dhcp_debian_services }}' | ||
when: > | ||
ansible_os_family == "Debian" and | ||
item.enabled |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,25 @@ | ||
--- | ||
- name: config | configuring kea dhcp service | ||
- name: config | configuring kea dhcp services (RedHat) | ||
template: | ||
src: "etc/kea/kea.conf.j2" | ||
dest: "/etc/kea/kea.conf" | ||
owner: "root" | ||
group: "root" | ||
mode: "o=rw,g=r,o=r" | ||
notify: | ||
- restart kea-dhcp | ||
- 'restart redhat kea-dhcp' | ||
when: ansible_os_family == "RedHat" | ||
|
||
- name: config | configuring kea dhcp services (Debian) | ||
template: | ||
src: "{{ item }}.j2" | ||
dest: "/{{ item }}" | ||
owner: "root" | ||
group: "root" | ||
mode: "o=rw,g=r,o=r" | ||
notify: | ||
- 'restart {{ ansible_os_family|lower }} kea-dhcp' | ||
with_items: | ||
- 'etc/kea/kea-dhcp-ddns.conf' | ||
- 'etc/kea/kea-dhcp4.conf' | ||
when: ansible_os_family == "Debian" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: debian | updating apt-cache | ||
apt: | ||
update_cache: "yes" | ||
cache_valid_time: 86400 | ||
|
||
- name: debian | installing kea packages | ||
apt: | ||
name: "{{ item }}" | ||
state: "present" | ||
with_items: '{{ kea_dhcp_debian_packages }}' |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
--- | ||
- name: services | enabling kea services | ||
- name: services | enabling kea services (Debian) | ||
service: | ||
name: "{{ item.name }}" | ||
enabled: "{{ item.enabled }}" | ||
with_items: '{{ kea_dhcp_services }}' | ||
with_items: '{{ kea_dhcp_debian_services }}' | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: services | ensuring kea services are started | ||
- name: services | ensuring kea services are started (Debian) | ||
service: | ||
name: "{{ item.name }}" | ||
state: "started" | ||
with_items: '{{ kea_dhcp_services }}' | ||
when: item.enabled | ||
with_items: '{{ kea_dhcp_debian_services }}' | ||
when: > | ||
ansible_os_family == "Debian" and | ||
item.enabled | ||
- name: services | enabling kea services (RedHat) | ||
service: | ||
name: "{{ item.name }}" | ||
enabled: "{{ item.enabled }}" | ||
with_items: '{{ kea_dhcp_redhat_services }}' | ||
when: ansible_os_family == "RedHat" | ||
|
||
- name: services | ensuring kea services are started (RedHat) | ||
service: | ||
name: "{{ item.name }}" | ||
state: "started" | ||
with_items: '{{ kea_dhcp_redhat_services }}' | ||
when: > | ||
ansible_os_family == "RedHat" and | ||
item.enabled |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# This is a basic configuration for the Kea DHCP DDNS. | ||
# Subnet declarations are commented out and no interfaces are listed. | ||
# Therefore, the servers will not listen or respond to any queries. | ||
# The basic configuration must be extended to specify interfaces on | ||
# which the servers should listen. Also, subnets and options must be | ||
# declared. | ||
{ | ||
|
||
# DHCP DDNS configuration starts here. | ||
"DhcpDdns": | ||
{ | ||
"ip-address": "127.0.0.1", | ||
"port": 53001, | ||
"tsig-keys": [], | ||
"forward-ddns" : {}, | ||
"reverse-ddns" : {} | ||
} | ||
} |
Oops, something went wrong.