diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2015-11-30 17:33:03 -0500 |
---|---|---|
committer | Kenny Woodson <kwoodson@redhat.com> | 2015-12-11 12:30:39 -0500 |
commit | 7c945d07d2a61e7334a10388d37ac28f1bc58ce1 (patch) | |
tree | d6a1c77f875ed11634aef0f79f476c2a5c7fa37c /bin/ossh_zsh_completion | |
parent | 5ad87a4592167142ec23058385b9bb96b594a12b (diff) | |
download | openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.gz openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.bz2 openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.tar.xz openshift-7c945d07d2a61e7334a10388d37ac28f1bc58ce1.zip |
Updating env-host-type to host patterns
Diffstat (limited to 'bin/ossh_zsh_completion')
-rw-r--r-- | bin/ossh_zsh_completion | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ossh_zsh_completion b/bin/ossh_zsh_completion index 3c4018636..f9454357b 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_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_environment"))])') + 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"))])') 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_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_environment"))])') + 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"))])') 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_environment"]) for dns, host in z["_meta"]["hostvars"].items() if all(k in host for k in ("ec2_tag_Name", "ec2_tag_environment"))])') + 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"))])') fi |