git://git.halfball.org
/
ansiblebook.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0dbdc6
)
Limit vagrant fields if more than 4
author
louxnix
<sleepycat@gmx.de>
Wed, 10 Feb 2016 07:37:57 +0000
(08:37 +0100)
committer
louxnix
<sleepycat@gmx.de>
Wed, 10 Feb 2016 07:37:57 +0000
(08:37 +0100)
Vagrant metadata contains 5 fields:
1455035554
,vagrant1,metadata,provider,virtualbox
vagrant --version
Vagrant 1.8.1
ch03/inventory/vagrant.py
patch
|
blob
|
history
diff --git
a/ch03/inventory/vagrant.py
b/ch03/inventory/vagrant.py
index
5a2b69a
..
767a6f0
100755
(executable)
--- a/
ch03/inventory/vagrant.py
+++ b/
ch03/inventory/vagrant.py
@@
-21,7
+21,7
@@
def list_running_hosts():
status = subprocess.check_output(cmd.split()).rstrip()
hosts = []
for line in status.split('\n'):
- (_, host, key, value) = line.split(',')
+ (_, host, key, value) = line.split(',')
[:4]
if key == 'state' and value == 'running':
hosts.append(host)
return hosts