Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Simple Deploy- and Management
package.dhcp.kea
Commits
ee5bbaeb
Commit
ee5bbaeb
authored
Apr 25, 2019
by
Pietsch, Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separate backend definitions in extra file
parent
edb84236
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
42 additions
and
37 deletions
+42
-37
templates/kea-dhcp-backends.j2
templates/kea-dhcp-backends.j2
+37
-0
templates/kea-dhcp4.conf.j2
templates/kea-dhcp4.conf.j2
+5
-37
No files found.
templates/kea-dhcp-backends.j2
0 → 100644
View file @
ee5bbaeb
{% 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 %}
templates/kea-dhcp4.conf.j2
View file @
ee5bbaeb
...
...
@@ -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 -%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment