dhcpd: Initial version of role.
Currently works only for main DHCP server.
This commit is contained in:
parent
4634a9687b
commit
d4a29bb758
5 changed files with 117 additions and 0 deletions
24
roles/dhcpd/tasks/main.yml
Normal file
24
roles/dhcpd/tasks/main.yml
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: include OS-specific variables
|
||||
include_vars: "{{ ansible_os_family }}.yml"
|
||||
|
||||
- name: install packages
|
||||
package:
|
||||
name: "{{ dhcpd_package }}"
|
||||
state: installed
|
||||
|
||||
- name: create config
|
||||
template:
|
||||
dest: "{{ dhcpd_config }}"
|
||||
src: dhcpd.conf.j2
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
#validate: "dhcpd -t -cf %s"
|
||||
notify: restart dhcpd
|
||||
|
||||
- name: enable service
|
||||
service:
|
||||
name: "{{ dhcpd_service }}"
|
||||
state: started
|
||||
enabled: true
|
||||
arguments: "-user _isc-dhcp -group _isc-dhcp vio0"
|
Loading…
Add table
Add a link
Reference in a new issue