Rex::Gr...kup::INI(3)

πŸ“¦ version 1.14.3, in nixos 26.05, nixpkgs unstable

πŸ’… 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 (like user=root password=foob4r) only do their thing when use_server_auth is 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