kubeasz/roles/cluster-storage/tasks/main.yml

23 lines
1.1 KiB
YAML
Raw Normal View History

2018-07-25 18:25:38 +08:00
- block:
2018-07-28 10:21:34 +08:00
- name: 准备nfs-client 配置目录
2018-07-28 11:50:39 +08:00
file: name={{ base_dir }}/manifests/storage/nfs state=directory
2018-07-25 18:25:38 +08:00
- name: 准备部署nfs-client动态存储
template:
src: nfs/nfs-client-provisioner.yaml.j2
2018-07-28 11:50:39 +08:00
dest: "{{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
2018-07-25 18:25:38 +08:00
- name: 开始部署nfs-client动态存储
2018-07-28 11:50:39 +08:00
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
2018-07-28 10:21:34 +08:00
when: 'storage_nfs_enabled == "yes"'
2018-07-25 18:25:38 +08:00
- block:
- name: 准备部署alicloud-nas动态存储
template:
src: alicloud-nas/alicloud-nas.yaml.j2
2018-07-28 11:50:39 +08:00
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
2018-07-25 18:25:38 +08:00
- name: 开始部署alicloud-disk存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"
- name: 开始部署alicloud-nas动态存储
2018-07-28 11:50:39 +08:00
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
2018-07-28 10:21:34 +08:00
when: 'storage_aliyun_nas_enabled == "yes"'
2018-07-25 18:25:38 +08:00