fixed: include all items from kern.disks split

salt['grains.get']('disks') always dropped the last disk (first in returned list from sysctl).
"sysctl -n" does not include sysctl-name, so the [1:] offset was wrong.
This commit is contained in:
gqgunhed 2015-12-15 21:00:48 +01:00 committed by rallytime
parent b3f17fdaf8
commit ed275977e3

View file

@ -72,7 +72,7 @@ def _freebsd_disks():
devices = __salt__['cmd.run']('{0} -n kern.disks'.format(sysctl))
SSD_TOKEN = 'non-rotating'
for device in devices.split(' ')[1:]:
for device in devices.split(' '):
if device.startswith('cd'):
log.debug('Disk grain skipping cd')
elif _freebsd_vbox():