0.1.22-DEV-20220828-202411
-------------------------- * ADD: - add support for centos 8+ * MODIFY: - modify dns for vlan1
This commit is contained in:
@ -26,7 +26,7 @@ dhcp_networks:
|
|||||||
range_from : 10.1.1.27
|
range_from : 10.1.1.27
|
||||||
range_to : 10.1.1.99
|
range_to : 10.1.1.99
|
||||||
broadcast : 10.1.1.255
|
broadcast : 10.1.1.255
|
||||||
dns : 10.1.1.211
|
dns : 10.10.10.55
|
||||||
pxeboot : 10.1.1.193
|
pxeboot : 10.1.1.193
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,6 +4,18 @@
|
|||||||
yum:
|
yum:
|
||||||
name: dhcp
|
name: dhcp
|
||||||
state: present
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_distribution == "CentOS"
|
||||||
|
- ansible_distribution_major_version < "8"
|
||||||
|
|
||||||
|
|
||||||
|
- name: install dhcp-server package
|
||||||
|
dnf:
|
||||||
|
name: dhcp-server
|
||||||
|
state: present
|
||||||
|
when:
|
||||||
|
- ansible_distribution == "CentOS"
|
||||||
|
- ansible_distribution_major_version >= "8"
|
||||||
|
|
||||||
|
|
||||||
- name: deploy dhcpd config
|
- name: deploy dhcpd config
|
||||||
@ -19,4 +31,9 @@
|
|||||||
name: dhcpd
|
name: dhcpd
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
state: started
|
||||||
when: ansible_distribution_major_version == "7" and ansible_virtualization_type != "docker"
|
when:
|
||||||
|
- ansible_distribution == "CentOS"
|
||||||
|
- ansible_virtualization_type != "docker"
|
||||||
|
|
||||||
|
|
||||||
|
...
|
||||||
|
Reference in New Issue
Block a user