Configuration¶
config.yaml¶
The default configuration file for homer
is expected to be found at /etc/homer/config.yaml
. Its path
can be changed in the CLI via the command-line switch -c/--config PATH
. A commented example configuration is
available in the source code at doc/examples/config.yaml
and included here below:
base_paths:
# Base path of public configuration.
public: /path/to/public-config-and-templates-root
# [optional] Base path of private configuration.
private: /path/to/private-config-and-templates-root
# Base path for the output files generated on the 'generate' action. The directory will be cleaned from all '*.out' files.
output: /path/where/to/generate/output/files
# Netbox configuration [optional]
netbox:
# Netbox URL
url: https://netbox.example.com:443
# Netbox token
token: token_value
# Inventory parmeters. [optional]
# If defined the list of devices will be gathered from Netbox, not from the config file. In this case the
# configuration file is used only to populate the device configuration data to be used when computing the generated
# configuration for the device.
inventory:
# Device roles to include in the selection. Values must match Netbox's slug values.
device_roles:
- roleA
- roleB
# Device statuses to include in the selection. Values must match Netbox's statuses.
device_statuses:
- Active
- Staged
transports:
# Username is optional, default to system user
username: MrFoobar
junos:
ignore_warning:
- statement must contain additional statements
- statement has no contents
# See https://junos-pyez.readthedocs.io/en/2.3.0/jnpr.junos.utils.html#jnpr.junos.utils.config.Config.load
The example file is also shipped, depending on the installation method, to:
$VENV_PATH/share/doc/homer/examples/config.yaml
when installed in a Pythonvirtualenv
viapip
./usr/local/share/doc/homer/examples/config.yaml
when installed globally viapip
./usr/share/doc/homer/examples/config.yaml
when installed via the Debian package.