Modif kea-dhcp-ha et stork

This commit is contained in:
phil
2025-01-24 00:24:26 +01:00
parent b5b2181d4f
commit 758a0ddb75
9 changed files with 341 additions and 188 deletions

View File

@@ -0,0 +1,47 @@
---
- hosts: all
become: true
tasks:
- name: Preparation depots
ansible.builtin.shell: curl -1sLf 'https://dl.cloudsmith.io/public/isc/stork/cfg/setup/bash.deb.sh' | sudo bash
- name: Update apt
ansible.builtin.apt:
update_cache: yes
- name: Installation isc-stork-server postgresql et postgresql-contrib
ansible.builtin.apt:
pkg:
- isc-stork-server
- postgresql
- postgresql-contrib
# - name: Lance la commande de création de la base de donnees stork
# ansible.builtin.shell: sudo postgresql-setup --initdb
- name : lancement postgres
ansible.builtin.service:
name: postgresql
state: restarted
enabled: yes
- name: Lance la commande de création de la base de donnees stork
ansible.builtin.shell: su postgres --command "stork-tool db-create --db-name {{ stork_db_name }} --db-user {{ stork_db_user }} --db-password {{ stork_db_passwd }}"
- name: Generation du fichier de configuration server.env
ansible.builtin.template:
src: server.env.j2
dest: /etc/stork/server.env
notify:
- Restart isc-stork-server.service
handlers:
- name: Restart isc-stork-server.service
ansible.builtin.service:
name: isc-stork-server.service
state: restarted
enabled: yes