feat(dcm_deploy): add optional rootless Podman deployment support#3
Conversation
7d5ccdf to
4b514ef
Compare
f3f837b to
595fdb5
Compare
🤖 AI Code ReviewPR Review: #3 — feat(dcm_deploy): add optional rootless Podman deployment support Gate Checks
Findings Summary
Medium Issues
Low Issues
Positive Observations✅ Architecture: Clean separation via internal facts ( ✅ Security: Proper service user setup with ✅ Error Handling: Preflight assertions catch mixed rootful/rootless deployments early with clear error messages. Proper ✅ Testing: New ✅ Documentation: Excellent updates to README.md and CLAUDE.md explaining the feature, path differences, requirements, and limitations. ✅ Ansible Best Practices: All modules use FQCN, proper RecommendationReady to merge. The rootless implementation is well-designed, thoroughly tested, and properly documented. The medium-severity finding about hardcoded subuid ranges is a hardening suggestion rather than a blocker — the chosen range (231072) is unlikely to conflict in practice and follows common conventions. ℹ️ Auto-merge: Skipped — repo not on auto-merge allowlist. |
testetson22
left a comment
There was a problem hiding this comment.
well, I got the bot to work directly from my local repo using my creds without any effort.
|
@testetson22 nice! |
|
Good catch on the subuid range. 231072:65536 is the conventional second allocation slot for rootless podman — collision is unlikely on single-purpose DCM hosts, and any system with custom subuid allocations would need to review these values regardless of whether they're in a variable or hardcoded. The linger check is intentional — avoids a I'll fix the test plan checkbox. |
6c344d8 to
a5e8cd3
Compare
Add rootless Podman deployment mode behind `dcm_rootless: true`. Creates a dedicated service user, configures user-scoped systemd, and adapts all paths and ownership for unprivileged operation. Includes Molecule test scenario for rootless template rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Chad Crum <chadcrum@users.noreply.github.com>
5ba057b to
3165c36
Compare
Summary
dcm_rootlessboolean (defaultfalse) for optional rootless Podman deployment — rootful remains the default with zero behavior changeresolve_rootless_varsphase runs first, creating a dedicated user with lingering, subuid/subgid ranges, and setting internal facts that redirect paths, ownership, and systemd scope{{ _dcm_wanted_by }}instead of hardcodedmulti-user.targetbecome_user,scope, andenvironmentdirectives for user-scoped systemd/podman operationsmolecule/rootless/scenario validates template rendering with rootless paths and targetsansible-core>=2.16(required forsystemd_servicescopeparameter)Tested on
RHEL 9.6 (sealusa12) with all providers enabled — 11/12 containers running under user-scoped systemd. ACM provider not started (dummy pull secret, not a deployment defect). Full QE validation: systemd units, file ownership, port publishing, container DNS, health checks, namespace isolation, cgroup hierarchy, SELinux contexts, idempotency, and service restart resilience — all pass.
Jira
FLPATH-4169
Test plan
molecule test— default (rootful) scenario passesmolecule test -s rootless— rootless scenario passesansible-playbook verify_compose_alignment.yml— compose alignmentyamllint -s .+ansible-lint— cleandcm_rootless: true/etc/containers/systemd/🤖 Generated with Claude Code