48 lines
1.4 KiB
Django/Jinja
48 lines
1.4 KiB
Django/Jinja
# Generated Hetzner Cloud server configuration
|
|
# Generated at: {{ now }}
|
|
# Provider: hetzner
|
|
# Provisioning version: {{ provisioning_version }}
|
|
|
|
import hetzner.server_hetzner as hetzner
|
|
|
|
servers: [hetzner.Server_hetzner] = [
|
|
{
|
|
hostname = "{{ hostname }}"
|
|
{% if title %}title = "{{ title }}"{% endif %}
|
|
server_type = "{{ server_type }}"
|
|
location = "{{ location }}"
|
|
image = "{{ image }}"
|
|
{% if backups %}backups = true{% endif %}
|
|
|
|
{% if volumes %}
|
|
volumes = [
|
|
{% for vol in volumes %}
|
|
{
|
|
name = "{{ vol.name }}"
|
|
size = {{ vol.size }}
|
|
{% if vol.automount %}automount = true{% endif %}
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
]
|
|
{% endif %}
|
|
|
|
{% if networks %}
|
|
networks = [
|
|
{% for net in networks %}
|
|
{
|
|
{% if net.name %}name = "{{ net.name }}"{% endif %}
|
|
{% if net.ip %}ip = "{{ net.ip }}"{% endif %}
|
|
}{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
]
|
|
{% endif %}
|
|
|
|
{% if labels %}
|
|
labels = {
|
|
{% for key, value in labels.items() %}
|
|
"{{ key }}" = "{{ value }}"{% if not loop.last %},{% endif %}
|
|
{% endfor %}
|
|
}
|
|
{% endif %}
|
|
}
|
|
]
|