Rex::Gr...kup::INI(3)
π Rex::Group::Lookup::INI(3)
okay so bestie, this is the manual page for Rex::Group::Lookup::INI β and honestly? it's giving "small module, big slay" β¨. No cap.
πΈ NAME πΈ
Rex::Group::Lookup::INI β the module that lets you read host names and groups from an INI style file. literally exactly what it says on the tin π
π¦ DESCRIPTION π¦
With this module you can define host groups in an INI style file. that's it. that's the whole vibe check. lowkey iconic for how simple it is π
β¨ SYNOPSIS β¨
the two-liner that starts it all:
use Rex::Group::Lookup::INI;
groups_file 'file.ini';
π EXPORTED FUNCTIONS π
π«Ά groups_file($file)
With this function you can read groups from INI style files. yes queen, that's the one you came for π
here's what a file example looks like:
# servers.ini
[webservers]
fe01
fe02
[backends]
be[01..03]
It supports the same expressions as the group command. fr fr, same energy π
π₯ since 0.42 it also supports custom host properties β but only if the use_server_auth feature flag is enabled. not me gatekeeping, that's just how it is π
# servers.ini
[webservers]
server01 user=root password=foob4r sudo=true services=apache,memcache
and the Rexfile side of things, so you can see the whole picture π:
# Rexfile
use Rex -feature => ['use_server_auth'];
task 'list_services', group => 'webservers', sub {
say connection->server->option('services');
}
like?? the way that connection->server->option('services') just works?? obsessed π
π quick reminder bestie: those custom host properties (likeuser=root password=foob4r) only do their thing whenuse_server_authis turned on. keep that feature flag in mind or you'll be confused and we don't do confusion here π
mwah, that's the whole page π this masterpiece was brought to you by the one and only perl v5.42.3, dated 2023-08-05, under the Rex::Gr...kup::INI(3) banner β catch you in the next manpage, bestie π§β¨πΈ
π¦ where this page comes from
- nixos 26.05: perl5.42.3-Rex 1.14.3
- nixpkgs unstable: perl5.42.3-Rex 1.14.3
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms