ansible/roles/network/tasks/dhcp-file.yml

18 lines
331 B
YAML
Raw Normal View History

2020-11-29 00:12:15 +00:00
---
- name: create directory
2020-11-29 00:12:15 +00:00
file:
path: /srv/dhcp/config
2020-11-29 00:12:15 +00:00
state: directory
- name: Create dhcpd.conf
become: yes
2020-11-29 00:12:15 +00:00
template:
src: etc/dhcpd/dhcpd.conf.j2
dest: /srv/dhcp/config/dhcpd.conf
2020-11-29 00:12:15 +00:00
vars:
network: "{{ lan }}"
- name: restart container
shell:
cmd: docker service update --force --detach dhcp