Extraction is not mirroring
A worker release contains payload.txt. The destination also contains obsolete.txt from an earlier version. After ZIP extraction, the extra file remains. unarchive extracts content; this does not establish that the directory exactly matches the approved set. The distinction matters operationally when an application automatically loads plugins or scripts from a directory. Define whether the contract permits additional files. If it requires an exact set, plan a fresh release directory and validate the manifest before a controlled pointer switch.
Execute the case and observe residue
The runner creates a local ZIP containing release-one and prepares obsolete.txt at both destinations. archive.yml explicitly creates the directory because extraction depends on it. remote_src: true refers to the ZIP already present on the machine where the module executes. Since both aliases are local, both can access that ZIP path; with SSH, this would have to be ensured on every node. After extraction the runner checks both the new payload and the surviving residual file. Repeating the same ZIP measures actual behavior with the tool available in this environment.
The marker that hides an update
The second rehearsal creates ready, changes the ZIP to release-two and enables creates. The existing marker suppresses the task and the payload remains release-one. There is no contradiction: the marker expresses existence, not the desired version’s hash. A useful marker should be tied to a version and appear only after the acceptance it represents. Even then, decide how later drift will be detected. In this exercise, disabling the marker allows release-two to install but does not remove obsolete.txt. Resolving one condition does not automatically resolve the other.
From example to operational change
For an artifact obtained outside the lab, record provenance and the digest approved through a trusted source. Comparing two hashes obtained through the same compromised channel only establishes consistency between those values. Check integrity before extraction and inspect the expected set afterward. In the change plan, distinguish pointer rollback from reversal of persistent data: an older worker may not understand already migrated data. The lab uses synthetic text only and does not demonstrate authenticated download, signatures, data migration or traffic switching.
- name: Inspect archive extraction semantics
hosts: workers
gather_facts: false
vars:
target_dir: "{{ lab_root }}/{{ inventory_hostname }}/release"
tasks:
- name: Create extraction directory explicitly
ansible.builtin.file:
path: "{{ target_dir }}"
state: directory
mode: '0700'
- name: Extract supplied local zip fixture
ansible.builtin.unarchive:
src: "{{ bundle_path }}"
dest: "{{ target_dir }}"
remote_src: true
creates: "{{ (target_dir ~ '/ready') if use_marker else omit }}"ready exists and the ZIP changed; creates preserves release-one. Removing the guard installs release-two while retaining obsolete.txt.
Common pitfalls
Treating extraction as cleanup; unversioned marker; remote_src as proof of distribution.
Related topics: Executable rehearsal: scope, state and limits · Validated configuration and observable activation · Recovery and change outcome
Validate version, file set and functional outcome separately.
Reference: Unarchive module · EX294 current objectives inspected 2026-09-30; RHCE in Ansible framework effective 2026-05-11; booking product version not publicly pinned