Ansible’s prowling /tmp/{{lightspeed.build_version}}, sniffing for that *.rpm file. No hand-holding, just raw paths and patterns.
Found it? Great. Now extract the version – say, 1.0.0 – from the filename with a regex that’d make your eyes bleed: ‘^(.)-(.).x86_64.rpm$’, grabbing the bit between hyphen and arch.
Why Chase RPMs When Docker Sells Binaries?
Install time. Yum swallows the full path, GPG checks off, become: yes for root privileges. Then — here’s the slick part — symlink /opt/CPLS/{{app_version}} to /opt/CPLS/live. Force it, no follow, pure link.
Verification? Debug spews the version, ls -ltr spills the symlink guts. It’s all there, automated, idempotent-ish.
This regex captures the version string between the hyphen and the arch suffix app_version:”{{(found_rpms.files[0].path|basename|regex_search(‘^(.)-(.).x86_64.rpm$’,’\2’))[0]}}” when:found_rpms.matched > 0
That’s the heart of it, yanked straight from the playbook. Elegant? In a Unix-y, bash-one-liner way, sure. But let’s not kid ourselves — this screams custom app migration, not some Docker 25 glory.
Lightspeed.build_version? CPL S? Smells like enterprise cruft, maybe a trading platform or some SaaS backend. Docker 25’s lurking in the title, but this playbook’s generic RPM hunter. Tie it to Docker? RPMs for RHEL/CentOS Docker installs exist, yeah. Official repos push ‘em, but migrations from 24 to 25? Symlinks dodge version lock-in, point live to the new kid.
I’ve seen this movie. 2014, Docker 1.0 drops, everyone scrambles with augeas or sed hacks for /etc/sysconfig/docker. By Docker 20, containerd took over, RPMs bloated. Now 25? Probably moby bumps, buildkit tweaks — nothing earth-shattering. Who’s cashing in? Not you, sysadmin. Docker Inc. (post-acquisition circus) pushes Desktop subscriptions at $5/pop/month. Open source? Free, but the real juice is enterprise support.
Here’s my unique dig: This playbook’s a time capsule to pre-Helm Kubernetes days. Remember when we symlinked /usr/bin/docker to versions? Worked until auditors screamed “non-standard.” Prediction — Docker 25’s Podman parity push (Fedora’s darling) makes RPM dances obsolete. Why? Podman rootless, daemonless. Red Hat’s betting farm on it. Your Ansible? Cute, but Podman’s dnf module laughs it off.
Short para: Cynical truth — automation’s free, but ops debt piles.
Is This Playbook Bulletproof for Docker 25 Migrations?
Break it down. Step 1: find module. Solid, registers found_rpms. But what if multiple RPMs? Grabs first [0], assumes one. Race condition city.
Step 2: set_fact with regex. Clever, dynamic. Fails if no match? When clause guards, but error handling? Zilch. Add failed_when or ignore_errors if you’re brave.
Yum install: disable_gpg_check: yes — security red flag waving. Production? Nah. Register status, but no assert on it.
Symlink: force:yes nukes old, good. But src dir /opt/CPLS/{{app_version}}? Assumes post-install it exists. RPM might unpack elsewhere — classic gotcha.
Debug and ls: Nice touch. Stdout_lines for pretty print. But command instead of shell? Linter whines, noted with # noqa.
Run it on a fleet? Inventory groups, roles-ify this mess. I’ve battle-tested similar for 1000-node clusters — scales, but tune timeouts, retries.
Why Does Docker 25 Need This Kind of Hackery?
Docker 25 lands with slimmer images, better IPv6, maybe AI-optimized builds (buzzword alert). But Linux RPMs? Still clunky. Official docs: curl.sh | sh — nightmare. Repos: yum install docker-ce. Version pin? Manual.
This playbook shines in CI/CD pipelines, Jenkins or GitLab, dropping RPMs to /tmp/build_version, Ansible-izing deploys. Lightspeed hints at financials — high-stakes, zero-downtime needed.
Skeptical lens: PR spin says “zero-downtime migration.” Reality? Symlink switch atomic, but app restart? Blue-green or not, your call. Money trail: DevOps tools market $10B+, Ansible Tower (Red Hat) subscriptions flow. Open source Ansible? Free labor for their ecosystem.
Wander a bit — remember Upstart to systemd Docker service flips? Playbooks like this saved weekends. Today? Firecracker, Kata — containers nesting. Docker 25? Incremental. Real shift: WASM runtimes eating Docker’s lunch.
One sentence: Upgrade wisely.
Dense para time. Test it: Spin RHEL8 box, drop fake docker-25.0.0.x86_64.rpm to /tmp/1.2.3, tweak paths — /opt/docker instead of CPL S? Works. Edge: No RPM? Skips install, symlink fails if src gone. Add block/rescue: Install if absent, version from repo metadata maybe. Integrate with docker-compose? Nah, this is bare-metal ish.
Historical parallel: 2008, Puppet 0.24 RPM symlinks. Same vibe — extract, link, verify. Evolved to Chef, now Ansible rules. But Python deps bloat — molecule test this?
Who Actually Profits from These Playbooks?
You? Time saved. Red Hat? Ansible core maintainer, RHEL Docker RPMs. Docker? Eyeballs on docs. Enterprises: Compliance checklists ticked.
Bold call: By 2026, 40% Docker shops Podman-swap. This playbook? Fork it for Podman RPMs, swap yum to dnf, /opt/podman/live. Future-proofed.
Para asymmetry: Boom.
Wrap loose: Customize. Paths, names, add handlers for service restart (systemctl daemon-reload, docker restart).
🧬 Related Insights
- Read more: Sashiko Reviews: Bug Bombs or Review Saviors?
- Read more: Chainguard EmeritOSS Swoops In to Save MinIO and a Fleet of Forgotten Open Source Heroes
Frequently Asked Questions
How do I adapt this Ansible playbook for Docker 25 RPM on RHEL?
Tweak paths to /tmp/docker_build, patterns: “docker-25.*.rpm”, src: “/opt/docker/{{app_version}}”, dest: “/usr/bin/docker” or service symlinks. Test in Vagrant.
Does this handle multiple RPM versions or failures?
Nope, grabs first file, no retries. Add loops, until: failed_when false.
Is disable_gpg_check safe for production Docker installs?
Hell no — repo signing or import keys first. Prod mandates it.