summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift_api/build/test/edit.yml
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-03-31 16:29:20 -0400
committerKenny Woodson <kwoodson@redhat.com>2016-04-04 12:27:37 -0400
commitfcf8e6f1af68797e4a54efb22a47095fc4e3bedf (patch)
tree4339ee6a75490cf5cba20a278545d9932a2b0bab /roles/lib_openshift_api/build/test/edit.yml
parent9451e288a77ed09cad19ef4fe27479f5b808277f (diff)
downloadopenshift-fcf8e6f1af68797e4a54efb22a47095fc4e3bedf.tar.gz
openshift-fcf8e6f1af68797e4a54efb22a47095fc4e3bedf.tar.bz2
openshift-fcf8e6f1af68797e4a54efb22a47095fc4e3bedf.tar.xz
openshift-fcf8e6f1af68797e4a54efb22a47095fc4e3bedf.zip
Yedit enhancements
Diffstat (limited to 'roles/lib_openshift_api/build/test/edit.yml')
-rwxr-xr-xroles/lib_openshift_api/build/test/edit.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/roles/lib_openshift_api/build/test/edit.yml b/roles/lib_openshift_api/build/test/edit.yml
new file mode 100755
index 000000000..9aa01303a
--- /dev/null
+++ b/roles/lib_openshift_api/build/test/edit.yml
@@ -0,0 +1,53 @@
+#!/usr/bin/ansible-playbook
+---
+- hosts: "oo_clusterid_mwoodson:&oo_version_3:&oo_master_primary"
+ gather_facts: no
+ user: root
+
+ post_tasks:
+ - copy:
+ dest: "/tmp/{{ item }}"
+ src: "files/{{ item }}"
+ with_items:
+ - dc.yml
+
+ - name: present dc
+ oc_edit:
+ kind: dc
+ namespace: default
+ name: router
+ content:
+ spec.template.spec.containers[0].ports[0].containerPort: 80
+ spec.template.spec.containers[0].ports[0].hostPort: 80
+ register: dcout
+
+ - debug:
+ var: dcout
+
+ - name: present dc
+ oc_edit:
+ kind: dc
+ namespace: default
+ name: router
+ content:
+ spec.template.spec.containers[0].ports[0].containerPort: 81
+ spec.template.spec.containers[0].ports[0].hostPort: 81
+ file_format: yaml
+ register: dcout
+
+ - debug:
+ var: dcout
+
+ - name: present dc
+ oc_edit:
+ kind: dc
+ namespace: default
+ name: router
+ content:
+ spec.template.spec.containers[0].ports[0].containerPort: 80
+ spec.template.spec.containers[0].ports[0].hostPort: 80
+ file_format: yaml
+ register: dcout
+
+ - debug:
+ var: dcout