Ansible Role linuxfabrik.lfops.icingaweb2_module_fileshipper¶
This role installs and enables the IcingaWeb2 Fileshipper Module. The Fileshipper extends the Icinga Director with two things: an Import Source that reads CSV / JSON / YAML / XML files from disk, and the ability to ship hand-crafted Icinga 2 config files through the Director.
This role is tested with the following IcingaWeb2 Fileshipper Module versions:
- 1.2.0
Available since LFOps 3.0.0.
How the Role Behaves¶
- The Tarball for
icingaweb2_module_fileshipper__versionis downloaded on the Ansible controller (delegate_to: 'localhost',run_once: true), then copied to the target. The controller therefore needs Internet access to GitHub; the target does not. - On every role run the directory
/usr/share/icingaweb2/modules/fileshipperis overwritten with the contents of the configured version. To upgrade or downgrade the module, changeicingaweb2_module_fileshipper__versionand re-run the role. icingacli module enable fileshipperis only invoked when/etc/icingaweb2/enabledModules/fileshipperdoes not yet exist (idempotent).- PHP runtime dependencies (
php-xml,php-yaml,php-zip) are not installed by this role directly; they are injected into thephprole via theicingaweb2_module_fileshipper__php__modules__dependent_vardefault. Install them via the linuxfabrik.lfops.php role (the bundled playbook does this for you).
Requirements¶
- The Ansible controller must have Internet access (downloads from
https://github.com/Icinga/icingaweb2-module-fileshipper/archive/).
Manual steps:
- Deploy a configured IcingaWeb2 by running the icingaweb2 playbook (role: linuxfabrik.lfops.icingaweb2).
- Deploy PHP with the
php-xml,php-yamlandphp-zipmodules by running the php playbook (role: linuxfabrik.lfops.php).
Tags¶
icingaweb2_module_fileshipper
- Installs and enables the IcingaWeb2 Fileshipper Module.
- Triggers: none.
Mandatory Role Variables¶
icingaweb2_module_fileshipper__version
- The module version to install. Possible options: https://github.com/Icinga/icingaweb2-module-fileshipper/releases.
- Type: String.
Example:
# mandatory
icingaweb2_module_fileshipper__version: 'v1.2.0'
Optional Role Variables¶
icingaweb2_module_fileshipper__url
- The URL from which the module tarball is downloaded. Override only if you mirror the upstream GitHub release elsewhere.
- Type: String.
- Default:
'https://github.com/Icinga/icingaweb2-module-fileshipper/archive/{{ icingaweb2_module_fileshipper__version }}.tar.gz'
Example:
# optional
icingaweb2_module_fileshipper__url: 'https://github.com/Linuxfabrik/icingaweb2-module-fileshipper/archive/{{ icingaweb2_module_fileshipper__version }}.tar.gz'