Created
December 11, 2017 16:18
-
-
Save dav1x/4668aa64e0c818f80dc207973ec72618 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Copy cloud provider storage class file | |
template: | |
src: cloud-provider-storage-class.yaml.j2 | |
dest: ~/cloud-provider-storage-class.yaml | |
- name: Copy cloud provider storage class file to single master | |
fetch: | |
src: ~/cloud-provider-storage-class.yaml | |
dest: ~/cloud-provider-storage-class.yaml | |
flat: yes | |
- name: Switch to default project | |
command: oc project default | |
- name: Check to see if storage class is already created | |
command: "oc get storageclass" | |
register: storage_class | |
- name: Create storage class | |
command: "oc create -f ~/cloud-provider-storage-class.yaml" | |
when: "'{{ vcenter_datastore }}' not in storage_class.stdout" | |
kind: StorageClass | |
apiVersion: storage.k8s.io/v1 | |
metadata: | |
name: "{{ vcenter_datastore }}" | |
provisioner: kubernetes.io/vsphere-volume | |
parameters: | |
diskformat: zeroedthick | |
datastore: "{{ vcenter_datastore }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment