add support place k8s manifests to the nodes

This commit is contained in:
nolte 2020-01-11 15:10:19 +01:00
parent da427f1518
commit 2307546be2
3 changed files with 14 additions and 0 deletions

View file

@ -14,6 +14,13 @@ k3s_github_url: https://github.com/rancher/k3s
# Installation directory for k3s
k3s_install_dir: /usr/local/bin
# Path for additional Kubernetes Manifests
# https://rancher.com/docs/k3s/latest/en/advanced/#auto-deploying-manifests
k3s_server_manifests_dir: /var/lib/rancher/k3s/server/manifests
# a list of templates used for preconfigure the CLuster.
k3s_server_manifests_templates: []
# Use experimental features in k3s?
k3s_use_experimental: false

View file

@ -0,0 +1,5 @@
- name: Copy Auto-Deploying Manifests to Cluster Master
template:
src: "{{ item }}"
dest: "{{ k3s_server_manifests_dir }}/{{ item | basename | replace('.j2','') }}"
with_items: "{{ k3s_server_manifests_templates }}"

View file

@ -28,6 +28,8 @@
- import_tasks: build/download-k3s.yml
- import_tasks: build/preconfigure-k3s-auto-deploying-manifests.yml
- import_tasks: build/install-k3s.yml
- import_tasks: build/configure-k3s-cluster.yml