style(k3s): get config from default instead of hard code

This commit is contained in:
Khue Doan 2021-12-24 18:17:24 +07:00
parent 26bf289166
commit 9921cfab2d
2 changed files with 8 additions and 6 deletions

View File

@ -2,3 +2,10 @@ k3s_version: v1.22.2+k3s2
k3s_config_file: /etc/rancher/k3s/config.yaml
k3s_token_file: /etc/rancher/node/password
k3s_service_file: /etc/systemd/system/k3s.service
k3s_server_config:
disable:
- local-storage
- servicelb
- traefik
disable-cloud-controller: true
secrets-encryption: true

View File

@ -5,10 +5,5 @@ server: https://{{ hostvars[groups['masters'][0]].ansible_host }}:6443
{% endif %}
token-file: {{ k3s_token_file }}
{% if 'masters' in group_names %}
disable-cloud-controller: true
disable:
- local-storage
- servicelb
- traefik
secrets-encryption: true
{{ k3s_server_config | to_nice_yaml }}
{% endif %}