Skip to content

feat(roles/curaline): add role and playbook - #448

Merged
NavidSassan merged 11 commits into
mainfrom
feat/curaline
Oct 20, 2026
Merged

NavidSassan merged 11 commits into
mainfrom
feat/curaline

Conversation

@NavidSassan

@NavidSassan NavidSassan commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Adds the curaline role and playbook, which install and configure the curaLINE Client (cdr-client) of Swisscom as swisscom-schweiz-ag-cdr-client.service, plus two Molecule scenarios.

  • The client tarball is downloaded on the controller and uploaded to the target. The install directory belongs to the service account, as with the Debian package of the client.
  • The service runs as curaline__user / curaline__group, by default swisscom-schweiz-ag-cdr-client like the Debian package. A missing account is created as a system user; an existing one, such as hnet of an H-Net SecureClient installation, is taken over unchanged. Existing connector folders keep their owner and mode.
  • The systemd unit is modelled on the one of the Debian package (same name and directories, $HOME in /var/lib/swisscom-schweiz-ag/cdr-client), but with a static user instead of DynamicUser=yes and the implied sandboxing set explicitly (ProtectSystem=strict, ReadWritePaths= for the installation, configuration and connector folders).
  • Connectors are a combined list variable (curaline__connectors__*_var, merged on connector-id + mode). The folders the role creates are derived from it.
  • curaline__renew_credential defaults to false (upstream: true), curaline__local_folder to /data/cdr-inflight (upstream: ${java.io.tmpdir}, which is emptied on every restart because of PrivateTmp=yes). Both deviations are documented.
  • On the Red Hat family with SELinux, the role sets the bin_t file context on the client's bin directory (community.general.sefcontext plus restorecon), also on --tags curaline:update.
  • Hosts with the Debian package of the client are not supported.
  • COMPATIBILITY.md: all eight OS columns are x. The client is only published for x86_64.

Test plan:

  • molecule test --scenario-name curaline/install and curaline/hnet on Debian 12 and 13, Rocky 8, 9 and 10, Ubuntu 22.04, 24.04 and 26.04: converge, verify, idempotence and verify again pass. verify.yml asks the running client for its health, version, schedule delay and watched folder, checks the process user, and on Rocky checks that SELinux is enforcing and the client runs in unconfined_service_t. The hnet scenario also checks that the existing account, folder modes and user_home_t labels stay untouched.
  • Upgrade and downgrade 6.2.1 → 6.1.1 → 6.2.1, also while 300 files were being uploaded (none lost or duplicated), and --tags curaline:update on its own (Rocky 9, SELinux enforcing).
  • Manual tests against the mock API of the client (Rocky 9, Debian 13): downloads, uploads, API error cases, IdP failures, renew_credential, missing folders, reboot, --check --diff (secret not shown), curaline__service_state: 'stopped'.
  • ansible-lint, yamllint, tests/unit/test_playbooks.py

NavidSassan and others added 11 commits October 15, 2026 11:36
Install and configure the curaLINE Client of Swisscom as cdr-client.service.
The client is downloaded on the controller, runs as an own system account,
and its connectors are a combined list variable that also drives the folders
the role creates.
Runs on all eight targets of COMPATIBILITY.md. verify.yml asks the running
client for its health, version, schedule delay and watched folder, and on the
RHEL family checks that SELinux is enforcing and the client runs in
unconfined_service_t.
…t with the Debian package

Add `curaline__user` and `curaline__group`, so the client can run under the `hnet` account of an existing H-Net SecureClient installation. An existing user is taken over unchanged, and existing connector folders keep their owner and mode.

The systemd unit now follows the one of the Debian package (name, directories, HOME), but with a static user instead of `DynamicUser=yes` and explicit sandboxing.
Move the existing scenario to `curaline/install` and add `curaline/hnet`, which prepares a host like an H-Net SecureClient installation and verifies that the role takes it over without changing the account or the existing folders.
…that hosts with the Debian package are not supported
…s, the effect of renew_credential and the SELinux label of downloads
…n values and name the failing check

The single assert is split so the abort names the failing condition and
the actual value. Comments are wrapped and the unit template comment no
longer contradicts the unsupported Debian package.
@NavidSassan
NavidSassan merged commit 6d946d5 into main Oct 20, 2026
13 checks passed
@NavidSassan
NavidSassan deleted the feat/curaline branch October 20, 2026 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants