Ansible Role linuxfabrik.lfops.repo_linuxfabrik¶
This role deploys the Linuxfabrik package repository, which serves the packages Linuxfabrik builds, for example FirewallFabrik and Glances. The repository has two channels: release, which is enabled, and testing, which is configured but disabled. New versions go to testing first and move to release after 7 days.
Available in the next LFOps release.
How the Role Behaves¶
- The role writes the same files as the
linuxfabrik-releasepackage, under the same names and with the same repository IDs (linuxfabrik,linuxfabrik-testing), so the two do not define the repository twice. Use either of them on a host, not both: installing the package after the role leaves alinuxfabrik.repo.rpmnew, and on Debian and Ubuntu dpkg asks whether to keep thelinuxfabrik.sourcesthe role deployed, which makes an installation without a terminal fail unless apt runs with--option Dpkg::Options::=--force-confold. Withlfops__remove_rpmnew_rpmsave, the role removes the.rpmnewand.dpkg-distfiles on its next run. - The signing key ships with the role, so the target does not fetch it from the Internet. It is deployed to
/etc/pki/rpm-gpg/RPM-GPG-KEY-linuxfabrikon the Red Hat family and SUSE, and to/usr/share/keyrings/linuxfabrik.gpgon Debian and Ubuntu, where the package keeps it as well. - dnf and zypper check the signature of the packages, apt checks the signature of the repository metadata. On the Red Hat family and SUSE, the role imports the key into the RPM database, so dnf and zypper do not ask to import it.
- On the Red Hat family, some packages from the repository, for example Glances, depend on EPEL and the CRB repository, which this role does not enable (roles: linuxfabrik.lfops.repo_epel, linuxfabrik.lfops.repo_baseos).
- With a mirror URL, the role expects the repository below
<mirror URL>/linuxfabrik/, in the same layout as on repo.linuxfabrik.ch, for example<mirror URL>/linuxfabrik/el/9/x86_64/linuxfabrik/release/or<mirror URL>/linuxfabrik/debian/linuxfabrik. - If the repository cannot be reached, for example because a mirror does not serve it, dnf skips it with an error message (
skip_if_unavailable=1, as in the package), zypper fails, and on Debian and Ubuntu the run of the role fails atapt update.
Known Limitations¶
- Supports Debian 11, 12 and 13, Fedora 44, RHEL 8, 9 and 10 and their derivatives, SLES, SLED and openSUSE Leap 15 and 16, and Ubuntu 22.04, 24.04 and 26.04, each on
x86_64andaarch64. The role aborts on other platforms. - HTTP basic auth for a mirror is supported on the Red Hat family and SUSE only.
Tags¶
repo_linuxfabrik
- Deploys the Linuxfabrik repository and its signing key.
- Triggers: none.
Optional Role Variables¶
repo_linuxfabrik__basic_auth_login
- Use HTTP basic auth to login to the repository. Only takes effect together with a custom mirror URL; repo.linuxfabrik.ch does not use basic auth. Defaults to
lfops__repo_basic_auth_login, making it easy to set this for allrepo_*roles. - Type: Dictionary.
- Default:
'{{ lfops__repo_basic_auth_login | d("") }}' -
Subkeys:
-
password:- Mandatory. Password.
- Type: String.
-
username:- Mandatory. Username.
- Type: String.
-
repo_linuxfabrik__mirror_url
- Set the URL to a custom mirror server providing the repository. Defaults to
lfops__repo_mirror_urlto allow easily setting the same URL for allrepo_*roles. Iflfops__repo_mirror_urlis not set, repo.linuxfabrik.ch is used. - Type: String.
- Default:
'{{ lfops__repo_mirror_url | d("") }}'
repo_linuxfabrik__testing_repo_enabled
- Enables the
testingchannel in addition to thereleasechannel. The package manager then installs the newest version from either channel, so new versions arrive 7 days earlier. - Type: Bool.
- Default:
false
Example:
# optional
repo_linuxfabrik__basic_auth_login:
username: 'my-username'
password: 'linuxfabrik'
repo_linuxfabrik__mirror_url: 'https://mirror.example.com'
repo_linuxfabrik__testing_repo_enabled: true