kea-dhcp-backends.j2 1.06 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{% if dhcp_backend == "memfile" %}
    "lease-database": {
        "type": "memfile",
        "name": "/var/db/kea/kea-leases4"
    },
{% elif dhcp_backend == "cassandra" %}
    "lease-database": {
        "type": "cql",
        "keyspace": "{{ dhcp_db_dbname }}"
        "contact-points": "{{ dhcp_db_host }}"
{%   if dhcp_db_port is defined %}
        "port": "{{ dhcp_db_port }}"
{%   endif %}
    },
{% else %}
    "lease-database": {
        "type": "{{ dhcp_backend }}",
        "name": "{{ dhcp_db_dbname }}",
        "host": "{{ dhcp_db_host }}",
{%   if dhcp_db_port is defined %}
        "port": "{{ dhcp_db_port }}"
{%   endif %}
        "user": "{{ dhcp_db_user }}"
        "password": "{{ dhcp_db_password | default("") }}"
    },

    "hosts-database": {
        "type": "{{ dhcp_backend }}",
        "name": "{{ dhcp_db_dbname }}",
        "host": "{{ dhcp_db_host }}",
{%   if dhcp_db_port is defined %}
        "port": "{{ dhcp_db_port }}"
{%   endif %}
        "user": "{{ dhcp_db_user }}"
        "password": "{{ dhcp_db_password | default("") }}"
    },
{% endif %}