-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f630991
commit 7f2edec
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
""" | ||
Vagrant external inventory script. Automatically finds the IP of the booted | ||
vagrant vm(s), and returns it under the host group 'vagrant' with either the | ||
machine name or - if set to default - the directory name of the Vagrantfile | ||
machine name or - if set to default - the directory name of the Vagrantfile | ||
as ansible inventory hostname. | ||
# Copyright (C) 2013 Mark Mandel <[email protected]> | ||
|
@@ -130,12 +130,12 @@ def get_a_ssh_config(box_id,box_name): | |
# ------------------------------ | ||
elif options.host: | ||
list_running_boxes() | ||
box_id = list(mapping.keys())[list(mapping.values()).index(options.host)] | ||
print(json.dumps(get_a_ssh_config(box_id,options.host), indent=4)) | ||
id = list(mapping.keys())[list(mapping.values()).index(options.host)] | ||
print(json.dumps(get_a_ssh_config(id,options.host), indent=4)) | ||
sys.exit(0) | ||
|
||
# Print out help | ||
# ------------------------------ | ||
else: | ||
parser.print_help() | ||
sys.exit(0) | ||
sys.exit(0) |