Loading inventory-sample.yml +4 −0 Original line number Diff line number Diff line Loading @@ -34,3 +34,7 @@ k3s_cluster: # 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 # registries_config_yaml: | # 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 roles/prereq/tasks/main.yml +14 −0 Original line number Diff line number Diff line Loading @@ -207,3 +207,17 @@ dest: "/var/lib/rancher/k3s/server/manifests" mode: 0600 loop: "{{ extra_manifests }}" - name: Setup optional private registry configuration when: registries_config_yaml is defined block: - name: Make k3s config directory ansible.builtin.file: path: "/etc/rancher/k3s" mode: 0755 state: directory - name: Copy config values ansible.builtin.copy: content: "{{ registries_config_yaml }}" dest: "/etc/rancher/k3s/registries.yaml" mode: 0644 Loading
inventory-sample.yml +4 −0 Original line number Diff line number Diff line Loading @@ -34,3 +34,7 @@ k3s_cluster: # 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 # registries_config_yaml: | # 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
roles/prereq/tasks/main.yml +14 −0 Original line number Diff line number Diff line Loading @@ -207,3 +207,17 @@ dest: "/var/lib/rancher/k3s/server/manifests" mode: 0600 loop: "{{ extra_manifests }}" - name: Setup optional private registry configuration when: registries_config_yaml is defined block: - name: Make k3s config directory ansible.builtin.file: path: "/etc/rancher/k3s" mode: 0755 state: directory - name: Copy config values ansible.builtin.copy: content: "{{ registries_config_yaml }}" dest: "/etc/rancher/k3s/registries.yaml" mode: 0644