kubeasz/roles/cluster-addon/tasks/nfs-provisioner.yml

18 lines
571 B
YAML

- name: 准备 nfs-provisioner 配置目录
file: name={{ cluster_dir }}/yml/nfs-provisioner state=directory
run_once: true
connection: local
- name: 准备 nfs-provisioner部署文件
template: src=nfs-provisioner/{{ item }}.j2 dest={{ cluster_dir }}/yml/nfs-provisioner/{{ item }}
with_items:
- "nfs-provisioner.yaml"
- "test-pod.yaml"
run_once: true
connection: local
- name: 创建 nfs-provisioner部署
shell: "{{ base_dir }}/bin/kubectl apply -f {{ cluster_dir }}/yml/nfs-provisioner/nfs-provisioner.yaml"
run_once: true
connection: local