2023-05-19 21:45:24 +08:00
|
|
|
- block:
|
|
|
|
- name: 准备 local-storage 配置目录
|
|
|
|
file: name={{ cluster_dir }}/yml/local-storage state=directory
|
|
|
|
|
|
|
|
- name: 准备 local-storage部署文件
|
|
|
|
template: src=local-storage/{{ item }}.j2 dest={{ cluster_dir }}/yml/local-storage/{{ item }}
|
|
|
|
with_items:
|
2023-05-22 15:19:29 +08:00
|
|
|
- "local-path-storage.yaml"
|
2023-05-19 21:45:24 +08:00
|
|
|
- "test-pod.yaml"
|
|
|
|
|
|
|
|
- name: 创建 local-storage部署
|
2023-05-22 15:19:29 +08:00
|
|
|
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/local-storage/local-path-storage.yaml"
|
2023-05-28 12:06:42 +08:00
|
|
|
when: 'local_path_provisioner_install == "yes" or (kubeapps_install == "yes" and kubeapps_storage_class == "local-path")'
|