GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Rex::Group::Lookup::DBI(3) User Contributed Perl Documentation Rex::Group::Lookup::DBI(3)

Rex::Group::Lookup::DBI - read hostnames and groups from a DBI source

With this module you can define hostgroups out of an DBI source.

 use Rex::Group::Lookup::DBI;
 groups_dbi "dsn", "user", "password", "SQL request";

With this function you can read groups from DBI source. Example:

 groups_dbi( 'DBI:mysql:rex;host=db01',
   user             => 'username',
   password         => 'password',
   sql              => "SELECT * FROM HOST",
   create_all_group => TRUE);

 CREATE TABLE IF NOT EXISTS `HOST` (
   `ID` int(11) NOT NULL,
   `GROUP` varchar(255) DEFAULT NULL,
   `HOST` varchar(255) NOT NULL,
   PRIMARY KEY (`ID`)
 );

 INSERT INTO `HOST` (`ID`, `GROUP`, `HOST`) VALUES
   (1, 'db', 'db01'),
   (2, 'db', 'db02'),
   (3, 'was', 'was01'),
   (4, 'was', 'was02');
2021-07-05 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.