From 41008ed85270fe7ae00261577d9f58c6ca905739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Sat, 16 Aug 2025 13:45:18 +0300 Subject: [PATCH] Add database configuration task for Kea in Deployer tasks --- tasks/deployer.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tasks/deployer.yml b/tasks/deployer.yml index 5abcc00..5103595 100644 --- a/tasks/deployer.yml +++ b/tasks/deployer.yml @@ -205,7 +205,7 @@ - kea state: latest -- name: "Deployer - Kea - Configure" +- name: "Deployer - Kea - Configure - DHCP4" ansible.builtin.template: src: './files/kea/kea-dhcp4.conf' dest: '/etc/kea/kea-dhcp4.conf' @@ -214,6 +214,13 @@ - kea - dhcp +- name: "Deployer - Kea - Configure - Database" + ansible.builtin.command: + cmd: "kea-admin db-init mysql -h 127.0.0.1 -n {{ config.mariadb.users['kea'].database }} -u {{ config.mariadb.users['kea'].username }} -p {{ config.mariadb.users['kea'].password }}" + tags: + - kea + - dhcp + - name: "Deployer : Kea : Restart" ansible.builtin.systemd_service: name: kea-dhcp4-server