--
You received this message because you are subscribed to the Google Groups "sal-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sal-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
df -h /Volumes/[your drive name] | awk '{print$5}' | grep %
this will output a percentage of free space on the named volume.
#dataHD_space.rb
Facter.add(:dataHD_space) do confine :kernel => :darwin setcode do %x{'df -h /Volumes/Data HD/ | awk '{print$5}' | grep %'} end end
$ facter
~/.facter/facts.d/dataHD_space.rb: line 2: syntax error near unexpected token `:dataHD_space'
~/.facter/facts.d/dataHD_space.rb: line 2: `Facter.add(:dataHD_space) do'
--
--
elif data == 'recent_error': | |
setA = machines.filter(fact__fact_name='timemachine_lastsnapshot', fact__fact_data__lt=time_month) | |
setB = machines.filter(fact__fact_name='timemachine_configured', fact__fact_data=1).exclude(fact__fact_name='timemachine_lastsnapshot') | |
machines = setA | setB | |
title = 'Machines backed up more than 28 days ago'
machines = setA | setB - I'm not familiar with the | operator in Python, does this mean setA OR setB? fact__fact_data__lt - is this a function defined elsewhere, or a variable... what does it represent? fact data limit? fact data length? Ditto for fact__fact_data__gte. |