blob: c362b7fca3197a57d29c71859cfa8be0a6e32fc6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
---
- name: Checking generation of {{file_content.kind}} {{file_content.metadata.name}}
shell: >
{{ openshift.common.client_binary }}
--config={{ kubeconfig }}
get {{file_content.kind}} {{file_content.metadata.name}}
-o jsonpath='{.metadata.resourceVersion}'
-n {{namespace}} || echo 0
register: generation_init
changed_when: no
- name: Applying {{file_name}}
command: >
{{ openshift.common.client_binary }} --config={{ kubeconfig }}
apply -f {{ file_name }}
-n {{ namespace }}
register: generation_apply
failed_when: "'error' in generation_apply.stderr"
changed_when: no
- name: Determine change status of {{file_content.kind}} {{file_content.metadata.name}}
shell: >
{{ openshift.common.client_binary }} --config={{ kubeconfig }}
get {{file_content.kind}} {{file_content.metadata.name}}
-o jsonpath='{.metadata.resourceVersion}'
-n {{namespace}} || echo 0
register: generation_changed
failed_when: "'error' in generation_changed.stderr"
changed_when: generation_changed.stdout | int > generation_init.stdout | int
|