mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Merge pull request #10574 from joefis/patch-1
Vagrant inventory: exit 0 on success
This commit is contained in:
@@ -107,7 +107,7 @@ if options.list:
|
|||||||
hosts['vagrant'].append(data['HostName'])
|
hosts['vagrant'].append(data['HostName'])
|
||||||
|
|
||||||
print json.dumps(hosts)
|
print json.dumps(hosts)
|
||||||
sys.exit(1)
|
sys.exit(0)
|
||||||
|
|
||||||
# Get out the host details
|
# Get out the host details
|
||||||
#------------------------------
|
#------------------------------
|
||||||
@@ -122,11 +122,11 @@ elif options.host:
|
|||||||
result['ansible_ssh_port'] = result['Port']
|
result['ansible_ssh_port'] = result['Port']
|
||||||
|
|
||||||
print json.dumps(result)
|
print json.dumps(result)
|
||||||
sys.exit(1)
|
sys.exit(0)
|
||||||
|
|
||||||
|
|
||||||
# Print out help
|
# Print out help
|
||||||
#------------------------------
|
#------------------------------
|
||||||
else:
|
else:
|
||||||
parser.print_help()
|
parser.print_help()
|
||||||
sys.exit(1)
|
sys.exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user