Rex::G...::YAML(3pm)
β¨ NAME β¨
okay so bestie, welcome to Rex::Group::Lookup::YAML π β she reads hostnames and groups straight out of a YAML file. yes, literally. it's giving "User Contributed Perl Documentation" and honestly it ate π
πΈ DESCRIPTION πΈ
so like. with this module you can define hostgroups out of an yaml file. that's the whole vibe. no cap π¦
π SYNOPSIS π
here's the whole thing in four lines, she's easy like that:
use Rex::Group::Lookup::YAML;
groups_yaml "file.yml";
π EXPORTED FUNCTIONS π
groups_yaml($file, create_all_group => $boolean )
okay so this function is the main character π β you use it to read groups from yaml files. and there's an optional create_all_group option you can pass in. if you set it to true, the group all gets created too, with all the hosts in it. like, all of them. every single one. periodt π
check it:
# in my_groups.yml
webserver:
- fe01
- fe02
- f03
backends:
- be01
- be02
- f03
# in Rexfile
groups_yaml('my_groups.yml');
# or
groups_yaml('my_groups.yml', create_all_group => TRUE);
bestie look atf03π she's in both groups, that's not a typo, that's just how the example is. also note the second call passesTRUEβ capital letters, she's loud and proud β¨
and that's the whole page, slay π
this lil doc lives in the User Contributed Perl Documentation section, it's perl v5.40.1 energy, and it was last touched 2025-10-03. mwah, take care of her π«Άπ
π¦ 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