summaryrefslogtreecommitdiffstats
path: root/roles/openshift_resource/tasks/patch.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-01 21:15:50 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-01 21:15:50 +0100
commit69adb23c59e991ddcabf5cfce415fd8b638dbc1a (patch)
tree8693e708f751923f6f7f9dd48004303bebb4e126 /roles/openshift_resource/tasks/patch.yml
parent1f3e2a9f59e83dc3f0fcbecf096a7e7b40d36ed7 (diff)
downloadands-69adb23c59e991ddcabf5cfce415fd8b638dbc1a.tar.gz
ands-69adb23c59e991ddcabf5cfce415fd8b638dbc1a.tar.bz2
ands-69adb23c59e991ddcabf5cfce415fd8b638dbc1a.tar.xz
ands-69adb23c59e991ddcabf5cfce415fd8b638dbc1a.zip
Improve handling of filesystem permissions and other fixes
Diffstat (limited to 'roles/openshift_resource/tasks/patch.yml')
-rw-r--r--roles/openshift_resource/tasks/patch.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/openshift_resource/tasks/patch.yml b/roles/openshift_resource/tasks/patch.yml
index e2bbcfa..501f692 100644
--- a/roles/openshift_resource/tasks/patch.yml
+++ b/roles/openshift_resource/tasks/patch.yml
@@ -1,10 +1,10 @@
---
-- name: Lookup the specified resource
+- name: "Lookup {{resource}} in {{project}}"
command: "oc get -n '{{project}}' '{{resource}}' -o json"
register: orig_result
changed_when: 0
-- name: Lookup API version of the specified resource
+- name: "Lookup API version of {{resource}} in {{project}}"
command: "oc get -n '{{project}}' '{{resource}}' --template {{'{{' + '.apiVersion' + '}}'}}"
register: api_version
changed_when: 0
@@ -13,14 +13,14 @@
- name: Escaping patch
set_fact: xpatch='{{patch | to_json | regex_replace(" ","") | regex_replace("^", " ")}}'
-- name: Generate dummy patch {{resource}} in {{project}}
+- name: "Generate dummy patch for {{resource}} in {{project}}"
command: "oc patch -n '{{project}}' --patch ' {\"apiVersion\": \"{{api_version.stdout}}\"}' --local=true -f - -o json"
args:
stdin: " {{ orig_result.stdout_lines | join('') }}"
register: dummy_result
changed_when: 0
-- name: Generate test patch {{resource}} in {{project}}
+- name: "Generate test patch {{resource}} in {{project}}"
command: "oc patch -n '{{project}}' --patch '{{xpatch}}' --local=true -f - -o json"
args:
stdin: " {{ orig_result.stdout_lines | join('') }}"
@@ -33,7 +33,7 @@
#- debug: msg="{{ patch_result.stdout }}"
# when: dummy_result.stdout != patch_result.stdout
-- name: Patch {{resource}} in {{project}}
+- name: "Patch {{resource}} in {{project}}"
command: "oc patch -n '{{project}}' '{{resource}}' --patch '{{xpatch}}'"
register: result
changed_when: (result | succeeded)