All checks were successful
continuous-integration/drone/push Build is passing
52 lines
1.2 KiB
Django/Jinja
52 lines
1.2 KiB
Django/Jinja
{% extends "base.tf.jinja" %}
|
|
|
|
{% block parameters %}
|
|
{{ super() }}
|
|
|
|
data "coder_parameter" "distro_release" {
|
|
name = "{{ distro_name }} Release"
|
|
description = "{{ distro_name }} Release"
|
|
type = "string"
|
|
default = ""
|
|
|
|
mutable = true
|
|
option {
|
|
name = "Latest"
|
|
value = ""
|
|
}
|
|
{% for version in distro_releases %}
|
|
option {
|
|
name = "{{ version }}"
|
|
value = "-{{ version }}"
|
|
}
|
|
{% endfor %}
|
|
}
|
|
{% endblock %}
|
|
|
|
{% block kubernetes_pod_main_image %}
|
|
image = "{{image}}${data.coder_parameter.distro_release.value}:latest"
|
|
{% endblock %}
|
|
|
|
{% block post_startup_script_setup_home %}
|
|
{% if startup_scripts %}
|
|
{% for startup_script in startup_scripts %}
|
|
{% include startup_script %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block startup_script_install_packages %}
|
|
{% if distro_package_manager == "apt" %}
|
|
sudo apt update
|
|
|
|
{% if packages_to_install is defined %}
|
|
sudo apt install {{ packages_to_install | join(" ") }}
|
|
{% endif %}
|
|
{% elif distro_package_manager == "apk" %}
|
|
sudo apk update
|
|
|
|
{% if packages_to_install is defined %}
|
|
sudo apk add {{ packages_to_install | join(" ") }}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endblock %} |