kea_dhcp(role): update to newest fux noc version
This commit is contained in:
parent
6006dbca27
commit
8d9cb0007c
14 changed files with 322 additions and 231 deletions
32
roles/kea_dhcp/templates/kea-dhcp4.conf.j2
Normal file
32
roles/kea_dhcp/templates/kea-dhcp4.conf.j2
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"Dhcp4": {
|
||||
"interfaces-config": {
|
||||
"interfaces": {{ kea_dhcp__dhcp4.interfaces | to_nice_json | indent(12) }}
|
||||
},
|
||||
"control-sockets": {{ kea_dhcp__dhcp4['control-sockets'] | to_nice_json | indent(8) }},
|
||||
"lease-database": {{ kea_dhcp__dhcp4['lease-database'] | to_nice_json | indent(8) }},
|
||||
{% if kea_dhcp__dhcp4['hooks-libraries'] is defined and kea_dhcp__dhcp4['hooks-libraries'] %}
|
||||
"hooks-libraries": {{ kea_dhcp__dhcp4['hooks-libraries'] | to_nice_json | indent(8) }},
|
||||
{% endif %}
|
||||
{% if kea_dhcp__dhcp4['option-data'] is defined and kea_dhcp__dhcp4['option-data'] %}
|
||||
"option-data": {{ kea_dhcp__dhcp4['option-data'] | to_nice_json | indent(8) }},
|
||||
{% endif %}
|
||||
"loggers": {{ kea_dhcp__dhcp4['logging'] | to_nice_json | indent(8) }},
|
||||
"subnet4": [
|
||||
{% for subnet in kea_dhcp__dhcp4.subnets %}
|
||||
{
|
||||
"id": {{ subnet.id }},
|
||||
"subnet": "{{ subnet.subnet }}",
|
||||
"pools": {{ subnet.pools | to_nice_json | indent(16) }},
|
||||
{% if subnet.reservations is defined and subnet.reservations %}
|
||||
"reservations": {{ subnet.reservations | to_nice_json | indent(16) }},
|
||||
{% endif %}
|
||||
{% if subnet['option-data'] is defined and subnet['option-data'] %}
|
||||
"option-data": {{ subnet['option-data'] | to_nice_json | indent(16) }}
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"Dhcp4": {
|
||||
"interfaces-config": {
|
||||
"interfaces": {{ kea_dhcp__dhcp4.interfaces | to_nice_json }}
|
||||
},
|
||||
"control-sockets": {{ kea_dhcp__dhcp4['control-sockets'] | to_nice_json }},
|
||||
"lease-database": {{ kea_dhcp__dhcp4['lease-database'] | to_nice_json }},
|
||||
{% if kea_dhcp__dhcp4['option-data'] is defined and kea_dhcp__dhcp4['option-data'] %}
|
||||
"option-data": {{ kea_dhcp__dhcp4['option-data'] | to_nice_json }},
|
||||
{% endif %}
|
||||
"subnet4": [
|
||||
{% for subnet in kea_dhcp__dhcp4.subnets %}
|
||||
{
|
||||
"id": {{ subnet.id }},
|
||||
"subnet": "{{ subnet.subnet }}",
|
||||
"pools": {{ subnet.pools | to_nice_json }},
|
||||
{% if subnet.reservations is defined and subnet.reservations %}
|
||||
"reservations": {{ subnet.reservations | to_nice_json }},
|
||||
{% endif %}
|
||||
{% if subnet['option-data'] is defined and subnet['option-data'] %}
|
||||
"option-data": {{ subnet['option-data'] | to_nice_json }}
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
}
|
||||
36
roles/kea_dhcp/templates/kea-dhcp6.conf.j2
Normal file
36
roles/kea_dhcp/templates/kea-dhcp6.conf.j2
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"Dhcp6": {
|
||||
"interfaces-config": {
|
||||
"interfaces": {{ kea_dhcp__dhcp6.interfaces | to_nice_json | indent(12) }}
|
||||
},
|
||||
"control-sockets": {{ kea_dhcp__dhcp6['control-sockets'] | to_nice_json | indent(8) }},
|
||||
"lease-database": {{ kea_dhcp__dhcp6['lease-database'] | to_nice_json | indent(8) }},
|
||||
{% if kea_dhcp__dhcp6['hooks-libraries'] is defined and kea_dhcp__dhcp6['hooks-libraries'] %}
|
||||
"hooks-libraries": {{ kea_dhcp__dhcp6['hooks-libraries'] | to_nice_json | indent(8) }},
|
||||
{% endif %}
|
||||
{% if kea_dhcp__dhcp6['option-data'] is defined and kea_dhcp__dhcp6['option-data'] %}
|
||||
"option-data": {{ kea_dhcp__dhcp6['option-data'] | to_nice_json | indent(8) }},
|
||||
{% endif %}
|
||||
"loggers": {{ kea_dhcp__dhcp6['logging'] | to_nice_json | indent(8) }}{% if kea_dhcp__dhcp6.subnets is defined and kea_dhcp__dhcp6.subnets %},{% endif %}
|
||||
{% if kea_dhcp__dhcp6.subnets is defined and kea_dhcp__dhcp6.subnets %}
|
||||
"subnet6": [
|
||||
{% for subnet in kea_dhcp__dhcp6.subnets %}
|
||||
{
|
||||
"id": {{ subnet.id }},
|
||||
"subnet": "{{ subnet.subnet }}",
|
||||
"interface": "{{ subnet.interface }}",
|
||||
"allocator": "{{ subnet.allocator | default("iterative") }}",
|
||||
"pools": {{ subnet.pools | to_nice_json | indent(16) }},
|
||||
{% if subnet.reservations is defined and subnet.reservations %}
|
||||
"reservations": {{ subnet.reservations | to_nice_json | indent(16) }},
|
||||
{% endif %}
|
||||
{% if subnet['option-data'] is defined and subnet['option-data'] %}
|
||||
"option-data": {{ subnet['option-data'] | to_nice_json | indent(16) }}
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
]
|
||||
{% endif %}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
{
|
||||
"Dhcp6": {
|
||||
"interfaces-config": {
|
||||
"interfaces": {{ kea_dhcp__dhcp6.interfaces | to_nice_json }}
|
||||
},
|
||||
"control-sockets": {{ kea_dhcp__dhcp6['control-sockets'] | to_nice_json }},
|
||||
"lease-database": {{ kea_dhcp__dhcp6['lease-database'] | to_nice_json }},
|
||||
{% if kea_dhcp__dhcp6['option-data'] is defined and kea_dhcp__dhcp6['option-data'] %}
|
||||
"option-data": {{ kea_dhcp__dhcp6['option-data'] | to_nice_json }},
|
||||
{% endif %}
|
||||
"subnet6": [
|
||||
{% for subnet in kea_dhcp__dhcp6.subnets %}
|
||||
{
|
||||
"id": {{ subnet.id }},
|
||||
"subnet": "{{ subnet.subnet }}",
|
||||
"pools": {{ subnet.pools | to_nice_json }},
|
||||
{% if subnet.reservations is defined and subnet.reservations %}
|
||||
"reservations": {{ subnet.reservations | to_nice_json }},
|
||||
{% endif %}
|
||||
{% if subnet['option-data'] is defined and subnet['option-data'] %}
|
||||
"option-data": {{ subnet['option-data'] | to_nice_json }}
|
||||
{% endif %}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
}
|
||||
44
roles/kea_dhcp/templates/stork-agent.env.j2
Normal file
44
roles/kea_dhcp/templates/stork-agent.env.j2
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
### the IP or hostname to listen on for incoming Stork server connections
|
||||
# STORK_AGENT_HOST=
|
||||
|
||||
### the TCP port to listen on for incoming Stork server connections
|
||||
# STORK_AGENT_PORT=8081
|
||||
|
||||
### listen for commands from the Stork server only, but not for Prometheus requests
|
||||
# STORK_AGENT_LISTEN_STORK_ONLY=true
|
||||
|
||||
{% if kea_dhcp__stork_agent.prometheus_only %}
|
||||
### listen for Prometheus requests only, but not for commands from the Stork server
|
||||
STORK_AGENT_LISTEN_PROMETHEUS_ONLY=true
|
||||
{% endif %}
|
||||
|
||||
### settings for exporting stats to Prometheus
|
||||
### the IP or hostname on which the agent exports Kea statistics to Prometheus
|
||||
# STORK_AGENT_PROMETHEUS_KEA_EXPORTER_ADDRESS=
|
||||
### the port on which the agent exports Kea statistics to Prometheus
|
||||
# STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PORT=
|
||||
## enable or disable collecting per-subnet stats from Kea
|
||||
# STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PER_SUBNET_STATS=true
|
||||
### the IP or hostname on which the agent exports BIND 9 statistics to Prometheus
|
||||
# STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_ADDRESS=
|
||||
### the port on which the agent exports BIND 9 statistics to Prometheus
|
||||
# STORK_AGENT_PROMETHEUS_BIND9_EXPORTER_PORT=
|
||||
|
||||
### Stork Server URL used by the agent to send REST commands to the server during agent registration
|
||||
# STORK_AGENT_SERVER_URL=
|
||||
|
||||
### skip TLS certificate verification when the Stork Agent connects
|
||||
### to Kea over TLS and Kea uses self-signed certificates
|
||||
# STORK_AGENT_SKIP_TLS_CERT_VERIFICATION=true
|
||||
|
||||
|
||||
### Logging parameters
|
||||
|
||||
### Set logging level. Supported values are: DEBUG, INFO, WARN, ERROR
|
||||
STORK_LOG_LEVEL=DEBUG
|
||||
### disable output colorization
|
||||
# CLICOLOR=false
|
||||
|
||||
### path to the hook directory
|
||||
# STORK_AGENT_HOOK_DIRECTORY=
|
||||
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
### Stork Agent env file
|
||||
### (created and managed by ansible kea_dhcp role)
|
||||
|
||||
|
||||
{% if kea_dhcp__stork_agent.prometheus_only %}
|
||||
### listen for Prometheus requests only, but not for commands from the Stork server
|
||||
STORK_AGENT_LISTEN_PROMETHEUS_ONLY=true
|
||||
{% endif %}
|
||||
|
||||
### settings for exporting stats to Prometheus
|
||||
### the IP or hostname on which the agent exports Kea statistics to Prometheus
|
||||
STORK_AGENT_PROMETHEUS_KEA_EXPORTER_ADDRESS=localhost
|
||||
### the port on which the agent exports Kea statistics to Prometheus
|
||||
# STORK_AGENT_PROMETHEUS_KEA_EXPORTER_PORT=
|
||||
|
||||
### Logging parameters
|
||||
|
||||
### Set logging level. Supported values are: DEBUG, INFO, WARN, ERROR
|
||||
STORK_LOG_LEVEL=DEBUG
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue