Skip to content

Ansible Role linuxfabrik.lfops.librenms

This role installs and configures LibreNMS.

Available since LFOps 2.0.0.

Dependent Roles

Any LFOps playbook that installs this role runs these for you. Optional ones can be disabled via the playbook's skip variables.

Tags

librenms

  • Installs and configures LibreNMS.
  • Triggers: none.

librenms:configure

  • Configures LibreNMS.
  • Triggers: none.

Mandatory Role Variables

librenms__database_login

  • The user account for accessing the MySQL database.
  • Type: Dictionary.

librenms__fqdn

  • The fully qualified domain name under which LibreNMS is accessible.
  • Type: String.

Example:

# mandatory
librenms__database_login:
  username: 'librenms'
  password: 'linuxfabrik'
librenms__fqdn: 'librenms.example.com'

Optional Role Variables

librenms__config_app_trusted_proxies

  • A list of trusted reverse proxy IPs or CIDR ranges, joined into the comma separated APP_TRUSTED_PROXIES setting in /opt/librenms/.env. Have a look at https://docs.librenms.org/Support/Environment-Variables/. An empty list leaves the setting untouched.
  • Type: List.
  • Default: []

librenms__config_app_url

  • The base URL used for generated URLs, for example when running behind a reverse proxy. Have a look at https://docs.librenms.org/Support/Environment-Variables/. An empty string leaves the APP_URL setting in /opt/librenms/.env untouched.
  • Type: String.
  • Default: ''

librenms__config_auth_mechanism

  • Which authentication mechanism LibreNMS should use. Have a look at https://docs.librenms.org/Extensions/Authentication/. Note that only one mechanism can be active at the same time. Possible options: active_directory, http-auth, ldap, ldap-authorization, mysql, sso.
  • Type: String.
  • Default: 'mysql'

librenms__config_rrd_purge

  • Number in days of how long to keep old rrd files. 0 disables this feature.
  • Type: Number.
  • Default: 0

librenms__config_update_channel

  • Which update channel LibreNMS should use during automatic updates. Possible options: master, release.
  • Type: String.
  • Default: 'release'

librenms__database_host

  • The host on which the MySQL database is reachable.
  • Type: String.
  • Default: 'localhost'

librenms__database_name

  • The name of the SQL database.
  • Type: String.
  • Default: 'librenms'

Example:

# optional
librenms__config_app_trusted_proxies:
  - '192.0.2.0/24'
  - '198.51.100.7'
librenms__config_app_url: 'https://librenms.example.com'
librenms__config_auth_mechanism: 'mysql'
librenms__config_rrd_purge: 730
librenms__config_update_channel: 'release'
librenms__database_host: 'localhost'
librenms__database_name: 'librenms'

License

The Unlicense

Author Information

Linuxfabrik GmbH, Zurich