crans_bcfg2/Python/etc/dhcp3/omapi.conf
Valentin Samir 80e87b27a1 [dhcp] COnfiguration pour le dhcp failover
Omapi et dhcp-failover.conf sont générés en utilisant le module
python puis inclus dans la conf générale.
On distingue dans groups.xml un dhcp primaire et secondaire.
À priori, il n'est pas possible d'avoir plusieurs secondaire, d'où
l'avertissement dans dhcp-failover.conf si jamais cela arrive.
2013-05-28 18:51:04 +02:00

21 lines
369 B
Python

# -*- mode: python; encoding: utf-8 -*-
info["owner"] = "root"
info["group"] = "root"
info["perms"] = 0600
comment_start = "#"
header("Configuration pour omapi pour %s" % admhostname)
include("secrets")
print """
omapi-port 9991;
key omapi_key {
algorithm HMAC-MD5;
secret "%s";
};
omapi-key omapi_key;
""" % secrets.dhcp_omapi_keys.get(admhostname, '')