blob: c72fa756e6d2c8efc664ea7dae0be0cb1610656e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
---
- name: Install dhcpd package
dnf:
name: dhcp-server
state: latest
notify:
- restart dhcpd
tags:
- packages
- name: Configure dhcpd
copy:
src: dhcpd/dhcpd.conf
dest: '/etc/dhcp/dhcpd.conf'
notify:
- restart dhcpd
- name: Enable dhcpd service
systemd:
name: dhcpd.service
enabled: yes
masked: no
state: started
when: "'container' not in ansible_env"
- name: '- when in nspawn'
command: systemctl enable dhcpd.service
args:
creates: '/etc/systemd/system/multi-user.target.wants/dhcpd.service'
when: "'container' in ansible_env"
# vim: set ts=2 sw=2 et:
|