2019-03-09 21:54:44 +01:00
|
|
|
---
|
|
|
|
|
2020-10-18 18:41:00 +02:00
|
|
|
##
|
|
|
|
# Global/Cluster Configuration
|
|
|
|
##
|
|
|
|
|
2020-10-23 17:40:35 +02:00
|
|
|
# k3s state, options: installed, started, stopped, restarted, uninstalled, validated
|
2019-12-20 20:03:27 +01:00
|
|
|
# (default: installed)
|
2020-10-17 19:26:30 +02:00
|
|
|
k3s_state: installed
|
2019-12-20 20:03:27 +01:00
|
|
|
|
2019-03-09 21:54:44 +01:00
|
|
|
# Use a specific k3s version, if set to "false" we will get the latest
|
2020-10-22 20:26:15 +02:00
|
|
|
# k3s_release_version: v1.19.3
|
2019-03-09 21:54:44 +01:00
|
|
|
k3s_release_version: false
|
|
|
|
|
2021-09-06 14:46:49 +02:00
|
|
|
# Location of the k3s configuration file
|
|
|
|
k3s_config_file: "/etc/rancher/k3s/config.yaml"
|
|
|
|
|
|
|
|
# Location of the k3s configuration directory
|
|
|
|
k3s_config_yaml_d_dir: "/etc/rancher/k3s/config.yaml.d"
|
2020-10-18 18:41:00 +02:00
|
|
|
|
2021-07-24 18:21:31 +02:00
|
|
|
# When multiple ansible_play_hosts are present, attempt to cluster the nodes.
|
2020-05-16 21:18:10 +02:00
|
|
|
# Using false will create multiple standalone nodes.
|
|
|
|
# (default: true)
|
|
|
|
k3s_build_cluster: true
|
|
|
|
|
2019-03-09 21:54:44 +01:00
|
|
|
# URL for GitHub project
|
2020-12-16 12:02:15 +01:00
|
|
|
k3s_github_url: https://github.com/k3s-io/k3s
|
2019-03-09 21:54:44 +01:00
|
|
|
|
2021-11-12 11:24:23 +01:00
|
|
|
# URL for K3s updates API
|
|
|
|
k3s_api_url: https://update.k3s.io
|
|
|
|
|
2022-01-02 22:10:48 +01:00
|
|
|
# Install K3s in Air Gapped scenarios
|
|
|
|
k3s_airgap: false
|
|
|
|
|
2020-09-21 20:38:51 +02:00
|
|
|
# Skip all tasks that validate configuration
|
|
|
|
k3s_skip_validation: false
|
|
|
|
|
2020-12-21 20:14:52 +01:00
|
|
|
# Skip all tasks that check environment configuration
|
|
|
|
k3s_skip_env_checks: false
|
|
|
|
|
2022-09-02 19:02:06 +02:00
|
|
|
# Skip post-checks
|
|
|
|
k3s_skip_post_checks: false
|
|
|
|
|
2019-03-09 21:54:44 +01:00
|
|
|
# Installation directory for k3s
|
|
|
|
k3s_install_dir: /usr/local/bin
|
|
|
|
|
2020-07-25 15:03:53 +02:00
|
|
|
# Install using hard links rather than symbolic links
|
|
|
|
k3s_install_hard_links: false
|
|
|
|
|
2021-09-06 14:46:49 +02:00
|
|
|
# A list of templates used for configuring the server.
|
|
|
|
k3s_server_config_yaml_d_files: []
|
|
|
|
|
|
|
|
# A list of templates used for configuring the agent.
|
|
|
|
k3s_agent_config_yaml_d_files: []
|
|
|
|
|
|
|
|
# A list of templates used for pre-configuring the cluster.
|
2020-01-11 15:10:19 +01:00
|
|
|
k3s_server_manifests_templates: []
|
|
|
|
|
2021-09-06 14:46:49 +02:00
|
|
|
# A list of URLs used for pre-configuring the cluster.
|
2021-05-27 00:07:22 +02:00
|
|
|
k3s_server_manifests_urls: []
|
2021-05-27 20:13:55 +02:00
|
|
|
# - url: https://some/url/to/manifest.yml
|
|
|
|
# filename: manifest.yml
|
2021-05-27 00:07:22 +02:00
|
|
|
|
2021-05-26 09:52:34 +02:00
|
|
|
# A list of templates used for installing static pod manifests on the control plane.
|
|
|
|
k3s_server_pod_manifests_templates: []
|
2021-05-26 09:43:07 +02:00
|
|
|
|
2021-05-27 00:07:22 +02:00
|
|
|
# A list of URLs used for installing static pod manifests on the control plane.
|
|
|
|
k3s_server_pod_manifests_urls: []
|
2021-05-27 20:13:55 +02:00
|
|
|
# - url: https://some/url/to/manifest.yml
|
|
|
|
# filename: manifest.yml
|
2021-05-27 00:07:22 +02:00
|
|
|
|
2019-12-21 18:11:30 +01:00
|
|
|
# Use experimental features in k3s?
|
|
|
|
k3s_use_experimental: false
|
|
|
|
|
2020-05-30 16:16:20 +02:00
|
|
|
# Allow for unsupported configurations in k3s?
|
|
|
|
k3s_use_unsupported_config: false
|
|
|
|
|
2020-12-12 15:27:59 +01:00
|
|
|
# Enable etcd embedded datastore
|
2020-10-23 17:31:21 +02:00
|
|
|
k3s_etcd_datastore: false
|
|
|
|
|
2021-02-16 16:46:01 +01:00
|
|
|
##
|
|
|
|
# Systemd config
|
|
|
|
##
|
|
|
|
|
|
|
|
# Start k3s on system boot
|
|
|
|
k3s_start_on_boot: true
|
|
|
|
|
|
|
|
# List of required systemd units to k3s service unit.
|
|
|
|
k3s_service_requires: []
|
|
|
|
|
|
|
|
# List of "wanted" systemd unit to k3s (weaker than "requires").
|
|
|
|
k3s_service_wants: []
|
|
|
|
|
|
|
|
# Start k3s before a defined list of systemd units.
|
|
|
|
k3s_service_before: []
|
|
|
|
|
|
|
|
# Start k3s after a defined list of systemd units.
|
|
|
|
k3s_service_after: []
|
2019-10-26 23:49:48 +02:00
|
|
|
|
2021-12-19 19:59:42 +01:00
|
|
|
# Dictionary of environment variables to use within systemd unit file
|
|
|
|
# Some examples below
|
|
|
|
k3s_service_env_vars: {}
|
|
|
|
# PATH: /opt/k3s/bin
|
|
|
|
# GOGC: 10
|
|
|
|
|
|
|
|
# Location on host of a environment file to include. This must already exist on
|
|
|
|
# the target as this role will not populate this file.
|
|
|
|
k3s_service_env_file: false
|
|
|
|
|
2024-07-19 05:14:18 +02:00
|
|
|
# Additional ExecStartPre commands for the k3s service in systemd
|
|
|
|
# This dictionary can be used to specify additional ExecStartPre commands
|
|
|
|
# for the k3s service. These commands will be executed before the main
|
|
|
|
# service starts. For example, the command below removes the
|
|
|
|
# cpu_manager_state file if it exists.
|
|
|
|
#
|
|
|
|
# Usage example:
|
|
|
|
# k3s_service_exec_start_pre_vars:
|
|
|
|
# - "-/usr/bin/rm -f /var/lib/kubelet/cpu_manager_state"
|
|
|
|
#
|
|
|
|
# Note: The "-" prefix before the command ensures that systemd ignores
|
|
|
|
# any errors that occur when executing the command.
|
|
|
|
k3s_service_exec_start_pre_vars: {}
|
2021-12-19 19:59:42 +01:00
|
|
|
|
2020-10-18 18:41:00 +02:00
|
|
|
##
|
|
|
|
# Server Configuration
|
|
|
|
##
|
2019-10-26 23:49:48 +02:00
|
|
|
|
2020-11-29 21:10:42 +01:00
|
|
|
k3s_server: {}
|
2020-10-18 18:41:00 +02:00
|
|
|
# k3s_server:
|
|
|
|
# listen-port: 6443
|
2020-02-25 09:48:09 +01:00
|
|
|
|
2020-10-18 18:41:00 +02:00
|
|
|
##
|
|
|
|
# Agent Configuration
|
|
|
|
##
|
2020-03-28 13:58:58 +01:00
|
|
|
|
2020-11-29 21:10:42 +01:00
|
|
|
k3s_agent: {}
|
2020-10-18 18:41:00 +02:00
|
|
|
# k3s_agent:
|
|
|
|
# node-label:
|
|
|
|
# - "foo=bar"
|
|
|
|
# - "bish=bosh"
|
2020-04-22 16:42:45 +02:00
|
|
|
|
2020-10-18 18:41:00 +02:00
|
|
|
##
|
|
|
|
# Ansible Controller configuration
|
|
|
|
##
|
2020-09-21 20:38:51 +02:00
|
|
|
|
2022-01-02 22:52:09 +01:00
|
|
|
# Use become privileges?
|
|
|
|
k3s_become: false
|
2021-05-07 11:56:45 +02:00
|
|
|
|
2021-05-08 12:39:19 +02:00
|
|
|
# Private registry configuration.
|
|
|
|
# Rancher k3s documentation: https://rancher.com/docs/k3s/latest/en/installation/private-registry/
|
2021-05-07 11:56:45 +02:00
|
|
|
k3s_registries:
|
2021-05-08 12:39:19 +02:00
|
|
|
|
2021-05-07 11:56:45 +02:00
|
|
|
mirrors:
|
|
|
|
# docker.io:
|
|
|
|
# endpoint:
|
|
|
|
# - "https://mycustomreg.com:5000"
|
|
|
|
configs:
|
|
|
|
# "mycustomreg:5000":
|
|
|
|
# auth:
|
2021-05-08 12:39:19 +02:00
|
|
|
# # this is the registry username
|
|
|
|
# username: xxxxxx
|
|
|
|
# # this is the registry password
|
|
|
|
# password: xxxxxx
|
2021-05-07 11:56:45 +02:00
|
|
|
# tls:
|
2021-05-08 12:39:19 +02:00
|
|
|
# # path to the cert file used in the registry
|
|
|
|
# cert_file:
|
|
|
|
# # path to the key file used in the registry
|
|
|
|
# key_file:
|
|
|
|
# # path to the ca file used in the registry
|
2021-05-27 20:13:55 +02:00
|
|
|
# ca_file:
|