aboutsummaryrefslogtreecommitdiffstats
path: root/ansible/roles/udhcpd/tasks/main.yml
blob: e44468426ad362dfdd260d5614d97a9d680bee3f (plain)
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: udhcpd | update apt-cache
  apt:
    cache_valid_time: 3600
    update_cache: yes

- name: udhcpd | install
  apt:
    name: udhcpd

- name: configure udhcpd
  template:
    src: etc/udhcpd.conf
    dest: /etc/udhcpd.conf

- name: copy systemd unit file
  copy:
    src: udhcpd.service
    dest: /lib/systemd/system/udhcpd.service
  register: udhcpdservice

- name: systemctl daemon-reload
  systemd:
    daemon_reload: yes
  when: udhcpdservice | changed

- name: ensure the systemd service is installed
  systemd:
    name: udhcpd.service
    state: started
    enabled: yes