-
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.
- This will allow us to dynamically define vars based on distros
- Loading branch information
1 parent
20ae374
commit 988809d
Showing
2 changed files
with
94 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
- name: set_facts | Setting Debian Facts | ||
set_fact: | ||
kea_dhcp_pre_reqs: | ||
- apt-transport-https | ||
- debian-archive-keyring | ||
- debian-keyring | ||
when: | ||
- ansible_distribution == "Debian" | ||
|
||
- name: set_facts | Setting Debian Facts | ||
set_fact: | ||
kea_dhcp_pre_reqs: | ||
- apt-transport-https | ||
when: | ||
- ansible_distribution == "Ubuntu" | ||
|
||
- name: set_facts | Setting RedHat Facts | ||
set_fact: | ||
kea_dhcp_pre_reqs: | ||
- yum-utils | ||
when: | ||
- ansible_os_family == "RedHat" | ||
|
||
- name: set_facts | Setting Kea Versions | ||
set_fact: | ||
kea_dhcp_repo: "{{ 'deb '+kea_dhcp_repos+'/kea-1-6/deb/'+ansible_distribution|lower+' '+ansible_distribution_release|lower+' main' }}" | ||
kea_dhcp_repo_key: "{{ kea_dhcp_repos+'/kea-1-6/cfg/gpg/gpg.0607E2621F1564A6.key' }}" | ||
when: | ||
- ansible_os_family == "Debian" | ||
- kea_dhcp_version is version('1.6', '>=') | ||
- kea_dhcp_version is version('1.7', '<') | ||
|
||
- name: set_facts | Setting Kea Versions | ||
set_fact: | ||
kea_dhcp_packages: | ||
- isc-kea-admin | ||
- isc-kea-dhcp-ddns-server | ||
- isc-kea-dhcp4-server | ||
- isc-kea-dhcp6-server | ||
kea_dhcp_repo: "{{ 'deb '+kea_dhcp_repos+'/kea-1-7/deb/'+ansible_distribution|lower+' '+ansible_distribution_release|lower+' main' }}" | ||
kea_dhcp_repo_key: "{{ kea_dhcp_repos+'/kea-1-7/cfg/gpg/gpg.40544590508A17DE.key' }}" | ||
when: | ||
- ansible_os_family == "Debian" | ||
- kea_dhcp_version is version('1.7', '>=') | ||
- kea_dhcp_version is version('1.8', '<') | ||
|
||
- name: set_facts | Setting Kea Versions | ||
set_fact: | ||
kea_dhcp_packages: | ||
- isc-kea | ||
kea_dhcp_repo_key: "{{ kea_dhcp_repos+'/kea-1-7/cfg/gpg/gpg.40544590508A17DE.key' }}" | ||
when: | ||
- ansible_os_family == "RedHat" | ||
- kea_dhcp_version is version('1.7', '>=') | ||
- kea_dhcp_version is version('1.8', '<') | ||
|
||
- name: set_facts | Setting Services Facts (Debian) | ||
set_fact: | ||
kea_dhcp_services: | ||
- name: isc-kea-dhcp-ddns-server | ||
enabled: "{{ kea_dhcp_service_state['ddns']|bool }}" | ||
- name: isc-kea-dhcp4-server | ||
enabled: "{{ kea_dhcp_service_state['ipv4']|bool }}" | ||
- name: isc-kea-dhcp6-server | ||
enabled: "{{ kea_dhcp_service_state['ipv6']|bool }}" | ||
when: ansible_os_family == "Debian" | ||
|
||
- name: set_facts | Setting Services Facts (RedHat) | ||
set_fact: | ||
kea_dhcp_services: | ||
- name: kea-dhcp-ddns | ||
enabled: "{{ kea_dhcp_service_state['ddns']|bool }}" | ||
- name: kea-dhcp4 | ||
enabled: "{{ kea_dhcp_service_state['ipv4']|bool }}" | ||
- name: kea-dhcp6 | ||
enabled: "{{ kea_dhcp_service_state['ipv6']|bool }}" | ||
when: ansible_os_family == "RedHat" |