优化storage,抽取tasks

pull/281/merge
lusyoe 2018-08-05 22:52:24 +08:00 committed by jmgao
parent 7119c70005
commit b3a0e1b936
3 changed files with 30 additions and 30 deletions

View File

@ -0,0 +1,18 @@
- name: 准备alicloud-nas配置目录
file: name={{ base_dir }}/manifests/storage/alicloud-nas state=directory
- name: 生成alicloud-nas动态存储配置
template:
src: alicloud-nas/alicloud-nas.yaml.j2
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
- name: 复制alicloud-disk配置
copy:
src: alicloud-disk.yaml
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"
- name: 开始部署alicloud-disk存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"
- name: 开始部署alicloud-nas动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"

View File

@ -1,34 +1,6 @@
- block: - include: nfs-client.yml
- name: 准备nfs-client 配置目录
file: name={{ base_dir }}/manifests/storage/nfs state=directory
- name: 生成nfs-client动态存储配置
template:
src: nfs/nfs-client-provisioner.yaml.j2
dest: "{{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
- name: 开始部署nfs-client动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
when: 'storage_nfs_enabled == "yes"' when: 'storage_nfs_enabled == "yes"'
- block: - include: alicloud-nas.yml
- name: 准备alicloud-nas配置目录
file: name={{ base_dir }}/manifests/storage/alicloud-nas state=directory
- name: 生成alicloud-nas动态存储配置
template:
src: alicloud-nas/alicloud-nas.yaml.j2
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
- name: 复制alicloud-disk配置
copy:
src: alicloud-disk.yaml
dest: "{{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"
- name: 开始部署alicloud-disk存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/alicloud-disk.yaml"
- name: 开始部署alicloud-nas动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/alicloud-nas/{{ aliyun_nas_controller_name }}.yaml"
when: 'storage_aliyun_nas_enabled == "yes"' when: 'storage_aliyun_nas_enabled == "yes"'

View File

@ -0,0 +1,10 @@
- name: 准备nfs-client 配置目录
file: name={{ base_dir }}/manifests/storage/nfs state=directory
- name: 生成nfs-client动态存储配置
template:
src: nfs/nfs-client-provisioner.yaml.j2
dest: "{{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"
- name: 开始部署nfs-client动态存储
shell: "{{ bin_dir }}/kubectl apply -f {{ base_dir }}/manifests/storage/nfs/{{ nfs_provisioner_name }}.yaml"