Skip to content

Instantly share code, notes, and snippets.

@krimdomu
Created April 3, 2013 09:58
Show Gist options
  • Select an option

  • Save krimdomu/5299913 to your computer and use it in GitHub Desktop.

Select an option

Save krimdomu/5299913 to your computer and use it in GitHub Desktop.
filling group from database
use Rex::Commands::DB {
dsn => "DBI:mysql:database=test;host=localhost",
user => "myuser",
password => "foobar",
};
group mygroup => map { $_->{name} } db select => {
fields => "name",
from => "servers",
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment