Interview Prep/Ansible/Vault, Privilege Escalation and Error Handling

What is `ansible-pull` and when would you use it?

IntermediateConceptVault, Privilege Escalation and Error Handling
Answer

ansible-pull inverts the model: each node clones a Git repository and runs a playbook against itself (localhost), usually on a cron or systemd timer.

ansible-pull -U https://git.example.com/infra/config.git -C main \
  -i localhost, local.yml --only-if-changed

Good for autoscaled instances that bootstrap themselves (user-data), for nodes behind NAT with no inbound SSH, and for very large fleets where one controller would be a bottleneck. Costs: Ansible and credentials on every node, and no central view of results unless you add reporting.

All Ansible questions Roadmap: Ansible

More on Vault, Privilege Escalation and Error Handling