diff options
author | Jason DeTiberus <jdetiber@redhat.com> | 2015-11-24 10:49:44 -0500 |
---|---|---|
committer | Jason DeTiberus <jdetiber@redhat.com> | 2015-11-30 16:57:03 -0500 |
commit | a2dc715e54f47fa2abbac58d9d04565837bc6e56 (patch) | |
tree | 03dedec3788aa8cf1cec9cade69d39ad22b78b28 /roles | |
parent | 830b2891f8628828bc4385ebafb71f4174f79a05 (diff) | |
download | openshift-a2dc715e54f47fa2abbac58d9d04565837bc6e56.tar.gz openshift-a2dc715e54f47fa2abbac58d9d04565837bc6e56.tar.bz2 openshift-a2dc715e54f47fa2abbac58d9d04565837bc6e56.tar.xz openshift-a2dc715e54f47fa2abbac58d9d04565837bc6e56.zip |
Set api version for oc commands
Diffstat (limited to 'roles')
-rw-r--r-- | roles/openshift_cluster_metrics/tasks/main.yml | 6 | ||||
-rw-r--r-- | roles/openshift_serviceaccounts/tasks/main.yml | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/roles/openshift_cluster_metrics/tasks/main.yml b/roles/openshift_cluster_metrics/tasks/main.yml index 3938aba4c..9b7735e54 100644 --- a/roles/openshift_cluster_metrics/tasks/main.yml +++ b/roles/openshift_cluster_metrics/tasks/main.yml @@ -7,7 +7,7 @@ - name: Create InfluxDB Services command: > - {{ openshift.common.client_binary }} create -f + {{ openshift.common.client_binary }} create -f /etc/openshift/cluster-metrics/influxdb.yaml register: oex_influxdb_services failed_when: "'already exists' not in oex_influxdb_services.stderr and oex_influxdb_services.rc != 0" @@ -15,14 +15,14 @@ - name: Create Heapster Service Account command: > - {{ openshift.common.client_binary }} create -f + {{ openshift.common.client_binary }} create -f /etc/openshift/cluster-metrics/heapster-serviceaccount.yaml register: oex_heapster_serviceaccount failed_when: "'already exists' not in oex_heapster_serviceaccount.stderr and oex_heapster_serviceaccount.rc != 0" changed_when: false - name: Add cluster-reader role to Heapster - command: > + command: > {{ openshift.common.admin_binary }} policy add-cluster-role-to-user cluster-reader diff --git a/roles/openshift_serviceaccounts/tasks/main.yml b/roles/openshift_serviceaccounts/tasks/main.yml index d93a25a21..e558a83a2 100644 --- a/roles/openshift_serviceaccounts/tasks/main.yml +++ b/roles/openshift_serviceaccounts/tasks/main.yml @@ -13,7 +13,9 @@ changed_when: "'serviceaccounts \"{{ item }}\" already exists' not in _sa_result.stderr and _sa_result.rc == 0" - name: Get current security context constraints - shell: "{{ openshift.common.client_binary }} get scc privileged -o yaml > /tmp/scc.yaml" + shell: > + {{ openshift.common.client_binary }} get scc privileged -o yaml + --output-version=v1 > /tmp/scc.yaml - name: Add security context constraint for {{ item }} lineinfile: @@ -23,4 +25,4 @@ with_items: accounts - name: Apply new scc rules for service accounts - command: "{{ openshift.common.client_binary }} update -f /tmp/scc.yaml" + command: "{{ openshift.common.client_binary }} update -f /tmp/scc.yaml --api-version=v1" |