diff options
author | Michael Gugino <mgugino@redhat.com> | 2017-11-28 21:03:25 -0500 |
---|---|---|
committer | Michael Gugino <mgugino@redhat.com> | 2017-12-05 09:40:51 -0500 |
commit | 0de559c8f2fd310fe36047ae000574229b7858c9 (patch) | |
tree | dcc495513f182308f7266a94a951b99d58f761d2 /roles/openshift_persistent_volumes/tasks/pv.yml | |
parent | 351785e4c44101fb109f03ac4aedbddd86faaa72 (diff) | |
download | openshift-0de559c8f2fd310fe36047ae000574229b7858c9.tar.gz openshift-0de559c8f2fd310fe36047ae000574229b7858c9.tar.bz2 openshift-0de559c8f2fd310fe36047ae000574229b7858c9.tar.xz openshift-0de559c8f2fd310fe36047ae000574229b7858c9.zip |
Fix hosted vars
Remove hosted vars from openshift_facts.
The current pattern is causing a bunch of undesired sideffects.
Diffstat (limited to 'roles/openshift_persistent_volumes/tasks/pv.yml')
-rw-r--r-- | roles/openshift_persistent_volumes/tasks/pv.yml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/roles/openshift_persistent_volumes/tasks/pv.yml b/roles/openshift_persistent_volumes/tasks/pv.yml new file mode 100644 index 000000000..346605ff7 --- /dev/null +++ b/roles/openshift_persistent_volumes/tasks/pv.yml @@ -0,0 +1,17 @@ +--- +- name: Deploy PersistentVolume definitions + template: + dest: "{{ mktemp.stdout }}/persistent-volumes.yml" + src: persistent-volume.yml.j2 + when: persistent_volumes | length > 0 + changed_when: False + +- name: Create PersistentVolumes + command: > + {{ openshift.common.client_binary }} create + -f {{ mktemp.stdout }}/persistent-volumes.yml + --config={{ mktemp.stdout }}/admin.kubeconfig + register: pv_create_output + when: persistent_volumes | length > 0 + failed_when: ('already exists' not in pv_create_output.stderr) and ('created' not in pv_create_output.stdout) + changed_when: ('created' in pv_create_output.stdout) |