Purpose: For operators, shows how to override default installation directories when the standard paths conflict with organizational policies or disk layout.
Task summary
Both roles use default paths on the C:\ drive. Override them when you need binaries on a different volume or must follow a specific directory convention.
Prerequisites
-
The target drive/directory must exist and be writable by the Ansible user
-
Completed the ../tutorial/getting-started.md[Getting Started tutorial] or have the collection installed
Steps
-
Define the path overrides in your playbook:
---
- name: Setup Windows Worker with custom paths
hosts: windows_workers
vars:
# win-containerd paths
containerd_path: "D:\\containerd"
cni_bin_path: "D:\\cni\\bin"
cni_config_path: "D:\\cni\\config"
# win-kubeadm paths
kubernetes_path: "D:\\kubernetes"
kubelet_log_path: "D:\\logs\\kubelet"
nssm_install_directory: "D:\\tools\\nssm"
# Required versions
containerd_version: "1.7.13"
crictl_version: "1.29.0"
kube_version: "1.29.0"
k8s_internal_ip: "10.0.0.10"
roles:
- opencenter-cloud.opencenter_windows_workers.win-containerd
- opencenter-cloud.opencenter_windows_workers.win-kubeadm
-
Run the playbook:
ansible-playbook -i inventory.ini windows-workers.yml
The roles create the directories if they don’t exist and add them to the system PATH.