Class: PuppetPSSH::CountNodes

Inherits:
Clamp::Command
  • Object
show all
Defined in:
lib/puppet-pssh.rb

Instance Method Summary collapse

Instance Method Details

#executeObject



308
309
310
311
312
313
314
315
316
317
# File 'lib/puppet-pssh.rb', line 308

def execute
  pdb = PuppetDB.new puppetdb_host, puppetdb_port
  active = pdb.active_nodes.size
  deactivated = pdb.deactivated_nodes.size
  total = active + deactivated
  Log.info "Node population"
  Log.info "Active nodes:   #{active}"
  Log.info "Inactive nodes: #{deactivated}"
  Log.info "Total:          #{total}"
end