---
name: "Rex::Group::Lookup::File"
section: "3pm"
platform: "linux"
package: "rex"
version: "1.16.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Rex::Group::Lookup::File"
---

# Rex::Group::Lookup::File(3pm)

read hostnames from a file.

## NAME

Rex::Group::Lookup::File - read hostnames from a file.

## DESCRIPTION

With this module you can define hostgroups out of a file.

## SYNOPSIS

```
 use Rex::Group::Lookup::File;
 group "webserver" => lookup_file("./hosts.lst");
```

## EXPORTED FUNCTIONS

### lookup\_file($file)

With this function you can read hostnames from a file. Every hostname in one line.

```
 group "webserver"  => lookup_file("./webserver.lst");
 group "mailserver" => lookup_file("./mailserver.lst");
```
