summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-11 09:56:25 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-11 09:56:25 -0500
commitf9e2aa24eebd73a2263571c5e5d40913c67fb768 (patch)
treec55fcce0dd5ae08662e867d5386de19a8d8d1624 /bin
parent407a83b1ceaeb96791edc8424bfccf59cd66c9e0 (diff)
parent645becf849fecee13d3e0bfcf6f780b3ecdd10de (diff)
downloadopenshift-f9e2aa24eebd73a2263571c5e5d40913c67fb768.tar.gz
openshift-f9e2aa24eebd73a2263571c5e5d40913c67fb768.tar.bz2
openshift-f9e2aa24eebd73a2263571c5e5d40913c67fb768.tar.xz
openshift-f9e2aa24eebd73a2263571c5e5d40913c67fb768.zip
Merge branch 'tab_completion' of github.com:kwoodson/openshift-ansible into tab_completion
Conflicts: bin/ossh_bash_completion
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ossh_bash_completion6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ossh_bash_completion b/bin/ossh_bash_completion
index 9ea8ad809..77b770a43 100755
--- a/bin/ossh_bash_completion
+++ b/bin/ossh_bash_completion
@@ -26,13 +26,13 @@ complete -F _ossh ossh oscp
__opssh_known_hosts(){
if python -c 'import openshift_ansible' &>/dev/null; then
- /usr/bin/python -c 'from openshift_ansible.multi_inventory import MultiInventory; m=MultiInventory(); m.run(); print "\n".join(["%s" % (host["oo_host-type"]) for dns, host in m.result["_meta"]["hostvars"].items() if "oo_host-type" in host])'
+ /usr/bin/python -c 'from openshift_ansible.multi_inventory import MultiInventory; m=MultiInventory(); m.run(); print "\n".join(set(["%s" % (host["oo_hosttype"]) for dns, host in m.result["_meta"]["hostvars"].items() if "oo_hosttype" in host]))'
elif [[ -f /dev/shm/.ansible/tmp/multi_inventory.cache ]]; then
- /usr/bin/python -c 'import json; loc="/dev/shm/.ansible/tmp/multi_inventory.cache"; z=json.loads(open(loc).read()); print "\n".join(["%s" % (host["oo_host-type"]) for dns, host in z["_meta"]["hostvars"].items() if "oo_host-type" in host])'
+ /usr/bin/python -c 'import json; loc="/dev/shm/.ansible/tmp/multi_inventory.cache"; z=json.loads(open(loc).read()); print "\n".join(set(["%s" % (host["oo_hosttype"]) for dns, host in z["_meta"]["hostvars"].items() if "oo_hosttype" in host]))'
elif [[ -f ~/.ansible/tmp/multi_inventory.cache ]]; then
- /usr/bin/python -c 'import json,os; loc="%s" % os.path.expanduser("/dev/shm/.ansible/tmp/multi_inventory.cache"); z=json.loads(open(loc).read()); print "\n".join(["%s" % (host["oo_host-type"]) for dns, host in z["_meta"]["hostvars"].items() if "oo_host-type" in host])'
+ /usr/bin/python -c 'import json,os; loc="%s" % os.path.expanduser("/dev/shm/.ansible/tmp/multi_inventory.cache"); z=json.loads(open(loc).read()); print "\n".join(set(["%s" % (host["oo_hosttype"]) for dns, host in z["_meta"]["hostvars"].items() if "oo_hosttype" in host]))'
fi
}