- remove tags from tasks - remove archlinux part - use debian default package for kea
39 lines
1 KiB
YAML
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
|