heyer.systems Open Source

Use

Modules

Building blocks for every app – choose them when you create a guest or add them any time, in containers and VMs alike.

Modules are building blocks shared across apps. Any module fits any app, as long as it supports the platform. Active modules take part in each update, so they stay current.

All modules

Each one has its own page with the commands to add or remove it and tips on using it:

Modules under Requires on an app’s page are ones the app can’t run without (NetBox needs its database, for instance). They’re always active there and can’t be removed.

Choose when creating

WhereHow
Dialogchoose “advanced”, then tick the modules – the app’s preselection is already set
Generator on the app pagetick the modules, the command then contains var_modules
Without a dialogvar_modules=node-exporter,unattended-upgrades (var_modules='' = none)

Note that var_modules replaces the preselection – include auto-update in the list if you want to keep it.

Add later

Inside the guest as root – containers and VMs work alike:

update -lm                       # available for this guest, numbered, ✓ = active
update -am node-exporter         # add
update -am 1,3                   # add modules 1 and 3 from the list

Sample output:

Modules for this LXC – 2 of 12 active

   #  Active  Module               Title
   1    ✓     auto-update          Automatic update (nightly)
   2          backup               Backup (restic)
   3          crowdsec             CrowdSec
   …
   9    ✓     postgresql           PostgreSQL – required by the app
   …

Add:     update -am NAME|NUMBER,…   e.g. update -am 2,fail2ban
Remove:  update -rm NAME|NUMBER,…
Details: https://iac.heyer.systems/modules/NAME/

Descriptions live on the module pages – Details gives the address.

Wherever a module is expected, a name or its number from update -lm will do, even mixed (update -am 2,fail2ban). The long forms --list-modules, --add-modules and --remove-modules are accepted too.

update -am is a normal update that installs the new modules along the way. Asking for a module this platform lacks (e.g. desktop in a container) fails before anything changes.

Guests managed by NetBox get their modules from the field Modules of their VM: iac-provisioner sets back a change made with update -am or -rm within minutes. Change the field in NetBox instead – update warns and asks first in such a guest.

You can also skip the login and go straight from the Proxmox host:

pct exec 105 -- update --add-modules node-exporter              # container 105
ssh root@192.168.40.21 update --add-modules node-exporter       # VM

Remove

update -rm desktop                  # remove single modules (also by number: update -rm 2)
update --modules ''                 # remove all optional modules
update --modules node-exporter      # set the selection completely

Removing a module takes its packages, services, firewall rules and configuration with it. Data stays – a PostgreSQL database, for example, is stopped but not deleted.

Your own modules

A module is an Ansible role in iac-core plus an entry in the catalog modules.json. The app reference explains how.