
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.
21 lines
369 B
Python
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, '')
|