Commit ee5bbaeb authored by Pietsch, Martin's avatar Pietsch, Martin

separate backend definitions in extra file

parent edb84236
{% 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 %}
......@@ -12,46 +12,14 @@
"socket-name": "/tmp/kea-dhcp4-ctrl.sock"
},
{% 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 %}
{% include "kea-dhcp-backends.j2" %}
"valid-lifetime": {{ dhcp_leasetimes["default"] }},
{%- if kea_ha_mode != "none" -%}
{% include "kea-dhcp-ha.j2" %}
{%- endif -%}
{%- set ipv4subnets = [] -%}
{%- for netclassname, netclass in network.classes.items() if netclass.dhcp is defined -%}
{%- if netclass.dhcp.ipv4 is defined -%}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment