Rex::G...up::INI(3pm)
π Rex::Group::Lookup::INI π
okay so bestie, this is a Perl module β it lives in the Rex::G...up::INI(3pm) zone (that 3pm is just the manual section, it's giving library-docs energy, not command-line) β and fr fr its whole thing is: it reads host names and host groups straight out of an INI style file. no cap.
β¨ DESCRIPTION β¨
With this module you can define host groups in an INI style file. that's it, that's the vibe. simple, iconic, slay. π
πΈ SYNOPSIS πΈ
like, here's the whole moveset:
use Rex::Group::Lookup::INI;
groups_file 'file.ini';
that's literally it. two lines and you're eating. π
π¦ EXPORTED FUNCTIONS π¦
π
groups_file($file)
With this function you can read groups from INI style files. pass it the file, it hands you the groups. main character energy.
File example:
# servers.ini
[webservers]
fe01
fe02
[backends]
be[01..03]
It supports the same expressions as the group command. (iykyk π)
Since 0.42, it also supports custom host properties if the use_server_auth feature flag is enabled:
# servers.ini
[webservers]
server01 user=root password=foob4r sudo=true services=apache,memcache
# Rexfile
use Rex -feature => ['use_server_auth'];
task 'list_services', group => 'webservers', sub {
say connection->server->option('services');
}
lowkey obsessed with the fact that you can just stapleuser=,password=,sudo=andservices=onto a host line now. but clock the fine print: that only happens whenuse_server_authis enabled. no flag, no properties, periodt. β
okay that's the whole page, you're welcome π«Ά this lil doc was served up by perl v5.40.1, dated 2025-10-03, and the manual name up top is your girl Rex::G...up::INI(3pm). go forth and group your hosts, bestie πβ¨
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms