ansible/roles/knot/tasks/RedHat.yaml

29 lines
922 B
YAML
Raw Normal View History

2024-01-20 01:26:37 +00:00
---
- name: Install knot {{- knot_version }} packages
dnf:
name: "{{ knot_packages }}"
state: "{{ 'latest' if knot_version == 'latest' else 'present' }}"
update_cache: true
- name: Include XDP configuratio
when: knot_xdp
block:
- name: Create override directory for knot systemd unit
file:
name: /etc/systemd/system/knot.service.d
state: directory
- name: Create override.conf for knot for XDP
copy:
dest: /etc/systemd/system/knot.service.d/override.conf
content: |
[Service]
CapabilityBoundingSet=CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_ADMIN CAP_IPC_LOCK CAP_SYS_RESOURCE
AmbientCapabilities=CAP_NET_RAW CAP_NET_ADMIN CAP_SYS_ADMIN CAP_IPC_LOCK CAP_SYS_RESOURCE
notify: Restart knot
- name: Install deps for XDP
dnf:
name: "{{ knot_deps_packages }}"
state: present
update_cache: true