summaryrefslogtreecommitdiffstats
path: root/roles/openshift_facts
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2015-11-23 15:21:23 -0500
committerScott Dodson <sdodson@redhat.com>2015-12-15 15:45:45 -0500
commit7a2891780e827513859628c7703cc1e7be53683f (patch)
tree54745bd070661ecf47e37fd3dff8898810ff2f3e /roles/openshift_facts
parentd3edce9c192c8d1eba572ba45ca25c06d0fbb830 (diff)
downloadopenshift-7a2891780e827513859628c7703cc1e7be53683f.tar.gz
openshift-7a2891780e827513859628c7703cc1e7be53683f.tar.bz2
openshift-7a2891780e827513859628c7703cc1e7be53683f.tar.xz
openshift-7a2891780e827513859628c7703cc1e7be53683f.zip
Add openshift_cli role
This role ensures that the clients package is installed or if it's a containerized install places a wrapper script in /usr/local/bin/openshift and symlinks for oc, oadm, and kubectl.
Diffstat (limited to 'roles/openshift_facts')
-rwxr-xr-xroles/openshift_facts/library/openshift_facts.py20
1 files changed, 2 insertions, 18 deletions
diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py
index b5454dd81..35ee18f4f 100755
--- a/roles/openshift_facts/library/openshift_facts.py
+++ b/roles/openshift_facts/library/openshift_facts.py
@@ -1014,22 +1014,6 @@ def set_container_facts_if_unset(facts):
if 'ovs_image' not in facts['node']:
facts['node']['ovs_image'] = ovs_image
- # shared /tmp/openshift vol is for file exchange with ansible
- # --privileged is required to read the config dir
- # --net host to access openshift from the container
- # maybe -v /var/run/docker.sock:/var/run/docker.sock is required as well
- runner = ("docker run --rm --privileged --net host -v "
- "/tmp/openshift:/tmp/openshift -v {datadir}:{datadir} "
- "-v {confdir}:{confdir} "
- "-e KUBECONFIG={confdir}/master/admin.kubeconfig "
- "{image}").format(confdir=facts['common']['config_base'],
- datadir=facts['common']['data_dir'],
- image=facts['common']['cli_image'])
-
- if facts['common']['is_containerized']:
- facts['common']['client_binary'] = '%s cli' % runner
- facts['common']['admin_binary'] = '%s admin' % runner
-
return facts
@@ -1134,8 +1118,8 @@ class OpenShiftFacts(object):
common = dict(use_openshift_sdn=True, ip=ip_addr, public_ip=ip_addr,
deployment_type='origin', hostname=hostname,
public_hostname=hostname, use_manageiq=False)
- common['client_binary'] = 'oc' if os.path.isfile('/usr/bin/oc') else 'osc'
- common['admin_binary'] = 'oadm' if os.path.isfile('/usr/bin/oadm') else 'osadm'
+ common['client_binary'] = 'oc'
+ common['admin_binary'] = 'oadm'
common['dns_domain'] = 'cluster.local'
common['install_examples'] = True
defaults['common'] = common