kubeasz/roles/cluster-addon/tasks/local-storage.yml

14 lines
547 B
YAML

- 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:
- "local-path-storage.yaml"
- "test-pod.yaml"
- name: 创建 local-storage部署
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/local-storage/local-path-storage.yaml"
when: 'local_path_provisioner_install == "yes"'