DevOps / Ansible Interview questions
What is Ansible Galaxy?
Ansible Galaxy is both a public hub for sharing reusable roles and collections, and the ansible-galaxy command-line tool for installing them into a local project.
ansible-galaxy install geerlingguy.nginx ansible-galaxy collection install community.docker
# requirements.yml roles: - name: geerlingguy.nginx collections: - name: community.docker version: ">=3.0.0"
Rather than writing a role for common tasks like installing nginx or PostgreSQL from scratch, teams can pull a well-maintained community role or vendor-published collection from Galaxy and layer their own configuration on top. A requirements.yml file lets a project declare exactly which roles/collections and versions it depends on, so ansible-galaxy install -r requirements.yml can reproducibly set up a fresh environment's dependencies.
More Related questions...