summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-02-09 12:29:45 +0100
committerJan Chaloupka <jchaloup@redhat.com>2017-02-11 20:59:03 +0100
commitc96cbe38a9dfd08909687b347dc00a18a894b235 (patch)
treed8d12efc939a3fcef00f4d784221c3439c9a0959 /roles
parentfc96d8d22f6c277b599e6e2fa4e9cc06814a9460 (diff)
downloadopenshift-c96cbe38a9dfd08909687b347dc00a18a894b235.tar.gz
openshift-c96cbe38a9dfd08909687b347dc00a18a894b235.tar.bz2
openshift-c96cbe38a9dfd08909687b347dc00a18a894b235.tar.xz
openshift-c96cbe38a9dfd08909687b347dc00a18a894b235.zip
replace 'oc service' command with its lib_openshift equivalent
Diffstat (limited to 'roles')
-rw-r--r--roles/openshift_hosted/meta/main.yml1
-rw-r--r--roles/openshift_hosted/tasks/registry/secure.yml11
2 files changed, 6 insertions, 6 deletions
diff --git a/roles/openshift_hosted/meta/main.yml b/roles/openshift_hosted/meta/main.yml
index ca5e88b15..ced71bb41 100644
--- a/roles/openshift_hosted/meta/main.yml
+++ b/roles/openshift_hosted/meta/main.yml
@@ -14,6 +14,7 @@ galaxy_info:
dependencies:
- role: openshift_cli
- role: openshift_hosted_facts
+- role: lib_openshift
- role: openshift_projects
openshift_projects: "{{ openshift_additional_projects | default({}) | oo_merge_dicts({'default':{'default_node_selector':''},'openshift-infra':{'default_node_selector':''},'logging':{'default_node_selector':''}}) }}"
- role: openshift_serviceaccounts
diff --git a/roles/openshift_hosted/tasks/registry/secure.yml b/roles/openshift_hosted/tasks/registry/secure.yml
index d87a3847c..b74cda5ba 100644
--- a/roles/openshift_hosted/tasks/registry/secure.yml
+++ b/roles/openshift_hosted/tasks/registry/secure.yml
@@ -20,11 +20,10 @@
failed_when: false
- name: Retrieve registry service IP
- command: >
- {{ openshift.common.client_binary }} get service docker-registry
- -o jsonpath='{.spec.clusterIP}'
- --config={{ openshift_hosted_kubeconfig }}
- -n default
+ oc_service:
+ namespace: default
+ name: docker-registry
+ state: list
register: docker_registry_service_ip
changed_when: false
@@ -37,7 +36,7 @@
--signer-cert={{ openshift_master_config_dir }}/ca.crt
--signer-key={{ openshift_master_config_dir }}/ca.key
--signer-serial={{ openshift_master_config_dir }}/ca.serial.txt
- --hostnames="{{ docker_registry_service_ip.stdout }},docker-registry.default.svc.cluster.local,{{ docker_registry_route_hostname }}"
+ --hostnames="{{ docker_registry_service_ip.results.clusterip }},docker-registry.default.svc.cluster.local,{{ docker_registry_route_hostname }}"
--cert={{ openshift_master_config_dir }}/registry.crt
--key={{ openshift_master_config_dir }}/registry.key
when: False in (docker_registry_certificates_stat_result.results | default([]) | oo_collect(attribute='stat.exists') | list)