# roles/dhcp/handlers/main.yml
---

- name: Restart DHCP
  tags: dhcp
  become: true
  service:
    name: "{{ dhcp_service }}"
    state: "{{ (dhcp_global_server_state | default('started') == 'started') | ternary('restarted', 'stopped') }}"

- name: Restart AppArmor
  tags: apparmor
  service:
    name: apparmor
    state: restarted
