2023-01-30 19:46:09 +01:00
|
|
|
---
|
|
|
|
k3s_cluster:
|
|
|
|
children:
|
|
|
|
server:
|
|
|
|
hosts:
|
2023-11-13 19:10:56 +01:00
|
|
|
192.16.35.11:
|
2023-01-30 19:46:09 +01:00
|
|
|
agent:
|
|
|
|
hosts:
|
2023-11-13 19:10:56 +01:00
|
|
|
192.16.35.12:
|
|
|
|
192.16.35.13:
|
2023-01-30 19:46:09 +01:00
|
|
|
|
2023-11-08 22:42:11 +01:00
|
|
|
# Required Vars
|
2023-01-30 19:46:09 +01:00
|
|
|
vars:
|
|
|
|
ansible_port: 22
|
|
|
|
ansible_user: debian
|
2023-11-09 21:56:38 +01:00
|
|
|
k3s_version: v1.26.9+k3s1
|
2024-05-17 18:58:57 +02:00
|
|
|
# The token should be a random string of reasonable length. You can generate
|
|
|
|
# one with the following commands:
|
|
|
|
# - openssl rand -base64 64
|
|
|
|
# - pwgen -s 64 1
|
|
|
|
# You can use ansible-vault to encrypt this value / keep it secret.
|
|
|
|
token: "changeme!"
|
2023-01-30 19:46:09 +01:00
|
|
|
api_endpoint: "{{ hostvars[groups['server'][0]]['ansible_host'] | default(groups['server'][0]) }}"
|
|
|
|
extra_server_args: ""
|
|
|
|
extra_agent_args: ""
|
2023-11-08 22:42:11 +01:00
|
|
|
|
2024-05-03 18:38:01 +02:00
|
|
|
# Optional vars
|
|
|
|
|
2024-04-01 18:35:55 +02:00
|
|
|
# cluster_context: k3s-ansible
|
2023-11-08 23:00:52 +01:00
|
|
|
# api_port: 6443
|
2023-11-08 22:42:11 +01:00
|
|
|
# k3s_server_location: /var/lib/rancher/k3s
|
|
|
|
# systemd_dir: /etc/systemd/system
|
2023-11-09 21:30:18 +01:00
|
|
|
# extra_service_envs: [ 'ENV_VAR1=VALUE1', 'ENV_VAR2=VALUE2' ]
|
2024-05-03 18:38:01 +02:00
|
|
|
# user_kubectl: true, by default kubectl is symlinked and configured for use by ansible_user. Set to false to only kubectl via root user.
|
|
|
|
|
2023-11-14 23:36:15 +01:00
|
|
|
# Manifests or Airgap should be either full paths or relative to the playbook directory.
|
2023-11-10 21:13:39 +01:00
|
|
|
# List of locally available manifests to apply to the cluster, useful for PVCs or Traefik modifications.
|
|
|
|
# extra_manifests: [ '/path/to/manifest1.yaml', '/path/to/manifest2.yaml' ]
|
2023-11-14 23:36:15 +01:00
|
|
|
# airgap_dir: /tmp/k3s-airgap-images
|
2024-05-03 18:38:01 +02:00
|
|
|
|
2023-12-06 22:55:32 +01:00
|
|
|
# server_config_yaml: |
|
2024-05-03 18:38:01 +02:00
|
|
|
# This is now an inner yaml file. Maintain the indentation.
|
|
|
|
# YAML here will be placed as the content of /etc/rancher/k3s/config.yaml
|
|
|
|
# See https://docs.k3s.io/installation/configuration#configuration-file
|
2024-04-02 21:24:23 +02:00
|
|
|
# registries_config_yaml: |
|
2024-05-03 18:38:01 +02:00
|
|
|
# Containerd can be configured to connect to private registries and use them to pull images as needed by the kubelet.
|
|
|
|
# YAML here will be placed as the content of /etc/rancher/k3s/registries.yaml
|
|
|
|
# See https://docs.k3s.io/installation/private-registry
|