ansible-infra/roles/kea_dhcp/tasks/stork-agent.yaml
bitwhisker 9bff86df7f
kea_dhcp(role): some fixes and removing arch part
- remove tags from tasks
- remove archlinux part
- use debian default package for kea
2026-05-26 10:21:28 +02:00

39 lines
1 KiB
YAML

---
- name: Install stork-agent
block:
- name: Install isc-stork-agent
when: ansible_facts['distribution'] == "Debian"
become: true
ansible.builtin.apt:
name: isc-stork-agent
- name: Add stork-agent user to _kea group on Debian
when: ansible_facts['distribution'] == "Debian"
become: true
ansible.builtin.user:
name: stork-agent
groups: [ "_kea" ]
append: true
- name: Config for stork-agent
ansible.builtin.template:
src: stork-agent.env.jinja
dest: /etc/stork/agent.env
owner: root
group: root
mode: "0660"
notify:
- Systemd_daemon_reload
- Stork_agent.restarted
- name: Flush handlers
ansible.builtin.meta: flush_handlers
- name: Ensure that stork kea exporter is working
ansible.builtin.uri:
url: "http://localhost:9547/metrics"
method: GET
register: kea_dhcp_stork_status_code
retries: 6
delay: 5
until: kea_dhcp_stork_status_code.status == 200