Interview Prep/Ansible/Vault, Performance and Execution Behaviour

Copying a 4 GB artifact with `copy` takes 20 minutes per host and sometimes times out

IntermediateTroubleshootingVault, Performance and Execution Behaviour
Answer

Likely causes → copy checksums the file on both sides and pushes it from the controller over SSH to every host, so the controller's uplink becomes the bottleneck.

Fix → Have the targets pull the artifact instead:

- ansible.builtin.get_url:
    url: "https://artifacts.internal/app/{{ app_version }}/app.tar.gz"
    dest: /opt/app/app.tar.gz
    checksum: "sha256:{{ app_sha256 }}"

For directory trees, use ansible.posix.synchronize, which needs rsync on both ends.

Prevent → Store artifacts in a repository (S3, Artifactory, Nexus) close to the hosts. Do not ship large binaries from the controller.

All Ansible questions Roadmap: Ansible

More on Vault, Performance and Execution Behaviour