6602760a48
- Local Volume StorageClass configuration is now manged by `local_volume_provisioner_storage_classes`, a list of maps that specifies local storage classes with `name` `host_dir` and `mount_dir` keys per entry - Tasks and templates updated to loop through local volume storage classes - Previous defaults for path/class names were not changed - Fixed an issue where a `kubernetes/preinstall` was creating directories inconsistently with the `kubernetes-apps/external_provisioner/local_volume_provisioner` task
59 lines
1.3 KiB
YAML
59 lines
1.3 KiB
YAML
---
|
|
- name: Create kubernetes directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: kube
|
|
when: inventory_hostname in groups['k8s-cluster']
|
|
become: true
|
|
tags:
|
|
- kubelet
|
|
- k8s-secrets
|
|
- kube-controller-manager
|
|
- kube-apiserver
|
|
- bootstrap-os
|
|
- apps
|
|
- network
|
|
- master
|
|
- node
|
|
with_items:
|
|
- "{{bin_dir}}"
|
|
- "{{ kube_config_dir }}"
|
|
- "{{ kube_config_dir }}/ssl"
|
|
- "{{ kube_manifest_dir }}"
|
|
- "{{ kube_script_dir }}"
|
|
|
|
- name: Create cni directories
|
|
file:
|
|
path: "{{ item }}"
|
|
state: directory
|
|
owner: kube
|
|
with_items:
|
|
- "/etc/cni/net.d"
|
|
- "/opt/cni/bin"
|
|
- "/var/lib/calico"
|
|
when:
|
|
- kube_network_plugin in ["calico", "weave", "canal", "flannel", "contiv", "cilium"]
|
|
- inventory_hostname in groups['k8s-cluster']
|
|
tags:
|
|
- network
|
|
- cilium
|
|
- calico
|
|
- weave
|
|
- canal
|
|
- contiv
|
|
- bootstrap-os
|
|
|
|
- name: Create local volume provisioner directories
|
|
file:
|
|
path: "{{ item.host_dir }}"
|
|
state: directory
|
|
owner: root
|
|
group: root
|
|
mode: 0700
|
|
with_items: "{{ local_volume_provisioner_storage_classes }}"
|
|
when:
|
|
- inventory_hostname in groups['k8s-cluster']
|
|
- local_volume_provisioner_enabled
|
|
tags:
|
|
- persistent_volumes
|