aboutsummaryrefslogblamecommitdiffstats
path: root/roles/space_server/tasks/dhcpd.yml
blob: 4102d696be5d61c9958a6cd0df1e03c2d498bba8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11










                             

                            
                                


               








                            

                          


                                                                        
              

                        
---
- name: Install dhcpd package
  dnf:
    name: dhcp-server
    state: latest
  notify:
    - restart dhcpd
  tags:
    - packages

- name: Configure dhcpd
  template:
    src: dhcpd/dhcpd.conf.j2
    dest: '/etc/dhcp/dhcpd.conf'
    owner: root
    group: root
    mode: 0644
  notify:
    - restart dhcpd

- name: Enable dhcpd service
  systemd:
    name: dhcpd.service
    enabled: yes
    masked: no
    state: started
  when: not chroot
- name: '- when in chroot'
  command: systemctl enable dhcpd.service
  args:
    creates: '/etc/systemd/system/multi-user.target.wants/dhcpd.service'
  when: chroot

# vim: set ts=2 sw=2 et: