passage de services-dhcp de cron à systemd-timer

mise_a_niveau
korenstin 2025-04-19 14:56:23 +02:00
parent 84a9954ee4
commit 6fc7c0a2e0
3 changed files with 20 additions and 6 deletions

View File

@ -8,8 +8,5 @@ glob_service_dhcp:
name: dhcp
install_dir: /var/local/services/dhcp
generated: true
cron:
frequency: "*/2 * * * *"
options: -q
dependencies:
- python3-jinja2

View File

@ -31,9 +31,25 @@ loc_service_dhcp:
git:
remote: https://gitlab.adm.crans.org/nounous/dhcp.git
version: main
cron:
frequency: "*/2 * * * *"
options: -r
systemd:
Unit:
After: network-online.target
Wants: network-online.target
StartLimitBurst: 3
StartLimitInterval: 40
Service:
Restart: on-failure
RestartSec: 10
ExecStart: "/usr/bin/python3 /var/local/services/dhcp/dhcp.py -r"
Type: oneshot
User: root
timer:
Unit: []
Timer:
OnCalendar: "*:0/2"
Persistent: true
Install:
WantedBy: timers.target
config:
ldap:
server: ldaps://flirt.adm.crans.org

View File

@ -4,6 +4,7 @@
ansible_2_16
python312
python312Packages.jinja2
python312Packages.jmespath # plays/dhcp.yml
python312Packages.python-ldap
];
LANG="C.UTF-8";