summaryrefslogtreecommitdiffstats
path: root/roles/openshift_resource/tasks/resource.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-04-14 02:06:54 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-04-14 02:06:54 +0200
commit5b9f90a1b410a0464eaad713c00b287174da80d2 (patch)
treed681138c6ea8b51ca266d4b4f23d4a150e2dd44a /roles/openshift_resource/tasks/resource.yml
parent162f7939376714306c8492f8c7a7eff25381bddb (diff)
downloadands-5b9f90a1b410a0464eaad713c00b287174da80d2.tar.gz
ands-5b9f90a1b410a0464eaad713c00b287174da80d2.tar.bz2
ands-5b9f90a1b410a0464eaad713c00b287174da80d2.tar.xz
ands-5b9f90a1b410a0464eaad713c00b287174da80d2.zip
Support replace-operation also for resources in openshift_resource role
Diffstat (limited to 'roles/openshift_resource/tasks/resource.yml')
-rw-r--r--roles/openshift_resource/tasks/resource.yml6
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/openshift_resource/tasks/resource.yml b/roles/openshift_resource/tasks/resource.yml
index 87af5c9..b07f645 100644
--- a/roles/openshift_resource/tasks/resource.yml
+++ b/roles/openshift_resource/tasks/resource.yml
@@ -16,7 +16,7 @@
changed_when: (rm_result | succeeded)
when: (recreate|default(false))
- - name: "Populate resources defined in {{ template }} to {{project}}"
- command: "oc create -n {{project}} -f '{{ template_path }}/{{ template }}' {{ create_args | default('') }}"
- when: (recreate|default(false)) or (find_result.rc != 0)
+ - name: "Populate resources defined in {{ template }} to {{project}} ({{ replace | default(false) | ternary('replace', 'create') }})"
+ command: "oc {{ replace | default(false) | ternary('replace', 'create') }} -n {{project}} -f '{{ template_path }}/{{ template }}' {{ create_args | default('') }}"
+ when: (recreate|default(false)) or (replace | default(false)) or (find_result.rc != 0)
run_once: true