mirror of
https://github.com/k3s-io/k3s-ansible.git
synced 2026-10-23 03:22:03 +02:00
* feat: make the server config file mode configurable /etc/rancher/k3s/config.yaml holds the cluster token. The server and upgrade roles write it at 0644, so every local account on a server node can read the credential that joins a node to the cluster. k3s_server_config_mode sets the mode of that file in both roles. It defaults to 0644, so behaviour is unchanged unless it is set. Signed-off-by: Kristofer <kristofer@atlascloud.is> * docs: describe the server config file contents accurately /etc/rancher/k3s/config.yaml does not always carry the cluster token. A first server that lets K3s generate one writes the file without it, so the file can contain the token rather than always holding it. Correct that claim in the README, the inventory sample and the role default, and use the US spelling of "honors". Signed-off-by: Kristofer <kristofer@atlascloud.is> * Name the floor the config file mode can be narrowed to Saying any mode root can read works leaves the reader to work out what that means in practice. The file is read only by k3s, running as root, so 0600 is the tightest mode that still works. Signed-off-by: Kristofer <kristofer@atlascloud.is> * Run the basic integration job with a non-default config file mode The templated mode was only ever rendered with its default in CI, which is the one value that cannot tell a working template from a broken one. The basic inventory sets 0640 and the job reads the mode back off the installed file. Signed-off-by: Kristofer <kristofer@atlascloud.is> --------- Signed-off-by: Kristofer <kristofer@atlascloud.is>
13 lines
670 B
YAML
13 lines
670 B
YAML
---
|
|
systemd_dir: /etc/systemd/system # noqa var-naming[no-role-prefix]
|
|
server_group: server # noqa var-naming[no-role-prefix]
|
|
agent_group: agent # noqa var-naming[no-role-prefix]
|
|
extra_install_envs: {} # noqa var-naming[no-role-prefix]
|
|
k3s_server_location: /var/lib/rancher/k3s # noqa var-naming[no-role-prefix]
|
|
api_port: 6443 # noqa var-naming[no-role-prefix]
|
|
extra_server_args: "" # noqa var-naming[no-role-prefix]
|
|
extra_agent_args: "" # noqa var-naming[no-role-prefix]
|
|
use_external_database: false # noqa var-naming[no-role-prefix]
|
|
k3s_server_config_mode: "0644" # noqa var-naming[no-role-prefix]
|
|
# api_endpoint must be provided by inventory for agent nodes
|