blob: 6c12d128c14448ee3b72c824b76da6984d938a33 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
---
- name: Deploy PersistentVolumeClaim definitions
template:
dest: "{{ mktemp.stdout }}/persistent-volume-claims.yml"
src: persistent-volume-claim.yml.j2
when: persistent_volume_claims | length > 0
changed_when: False
- name: Create PersistentVolumeClaims
command: >
{{ openshift_client_binary }} create
-f {{ mktemp.stdout }}/persistent-volume-claims.yml
--config={{ mktemp.stdout }}/admin.kubeconfig
register: pvc_create_output
when: persistent_volume_claims | length > 0
failed_when: "('already exists' not in pvc_create_output.stderr) and ('created' not in pvc_create_output.stdout) and pvc_create_output.rc != 0"
changed_when: ('created' in pvc_create_output.stdout)
|