summaryrefslogtreecommitdiffstats
path: root/bin/ossh_zsh_completion
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-11 09:28:35 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-11 09:32:14 -0500
commit407a83b1ceaeb96791edc8424bfccf59cd66c9e0 (patch)
tree7e1b0b3373fff9a192f8389e44d1d688f5bc1959 /bin/ossh_zsh_completion
parent6fa4515290d2a44dfc263f70e862b204a72bb5cd (diff)
downloadopenshift-407a83b1ceaeb96791edc8424bfccf59cd66c9e0.tar.gz
openshift-407a83b1ceaeb96791edc8424bfccf59cd66c9e0.tar.bz2
openshift-407a83b1ceaeb96791edc8424bfccf59cd66c9e0.tar.xz
openshift-407a83b1ceaeb96791edc8424bfccf59cd66c9e0.zip
Fixing tab completion for latest metadata changes
Diffstat (limited to 'bin/ossh_zsh_completion')
-rw-r--r--bin/ossh_zsh_completion6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ossh_zsh_completion b/bin/ossh_zsh_completion
index f9454357b..170ca889b 100644
--- a/bin/ossh_zsh_completion
+++ b/bin/ossh_zsh_completion
@@ -2,13 +2,13 @@
_ossh_known_hosts(){
if python -c 'import openshift_ansible' &>/dev/null; then
- print $(/usr/bin/python -c 'from openshift_ansible import multi_inventory; m=multi_inventory.MultiInventory(); m.run(); z=m.result; print "\n".join(["%s.%s" % (host["ec2_tag_Name"],host["ec2_tag_env"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_env"))])')
+ print $(/usr/bin/python -c 'from openshift_ansible import multi_inventory; m=multi_inventory.MultiInventory(); m.run(); z=m.result; print "\n".join(["%s.%s" % (host["oo_name"],host["oo_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("oo_name", "oo_environment"))])')
elif [[ -f /dev/shm/.ansible/tmp/multi_inventory.cache ]]; then
- print $(/usr/bin/python -c 'import json; loc="/dev/shm/.ansible/tmp/multi_inventory.cache"; z=json.loads(open(loc).read()); print "\n".join(["%s.%s" % (host["ec2_tag_Name"],host["ec2_tag_env"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_env"))])')
+ print $(/usr/bin/python -c 'import json; loc="/dev/shm/.ansible/tmp/multi_inventory.cache"; z=json.loads(open(loc).read()); print "\n".join(["%s.%s" % (host["oo_name"],host["oo_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("oo_name", "oo_environment"))])')
elif [[ -f ~/.ansible/tmp/multi_inventory.cache ]]; then
- print $(/usr/bin/python -c 'import json,os; loc="%s" % os.path.expanduser("~/.ansible/tmp/multi_inventory.cache"); z=json.loads(open(loc).read()); print "\n".join(["%s.%s" % (host["ec2_tag_Name"],host["ec2_tag_env"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_env"))])')
+ print $(/usr/bin/python -c 'import json,os; loc="%s" % os.path.expanduser("~/.ansible/tmp/multi_inventory.cache"); z=json.loads(open(loc).read()); print "\n".join(["%s.%s" % (host["oo_name"],host["oo_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("oo_name", "oo_environment"))])')
fi