# Playbook collection

**URL:** <https://forum.ansible.com/t/playbook-collection/3958>\
**Category:** Get Help\
**Tags:** awx, collections\
**Created:** [February 20, 2024, 10:50am UTC](https://forum.ansible.com/t/playbook-collection/3958 "2024-02-20T10:50:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gothsome](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gothsome](https://forum.ansible.com/u/gothsome)\
**Post date:** [February 20, 2024, 10:50am UTC](https://forum.ansible.com/t/playbook-collection/3958/1 "2024-02-20T10:50:55Z")

</div>

Hello!  
I just wanted to know if there is a collection/Git of example playbooks?

Thank you!

---

<div class="post-metadata">

**Author:** ![thedoubl3j](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/thedoubl3j/32/103_2.png) [@thedoubl3j](https://forum.ansible.com/u/thedoubl3j)\
**Post date:** [February 20, 2024, 7:40pm UTC](https://forum.ansible.com/t/playbook-collection/3958/2 "2024-02-20T19:40:50Z")

</div>

Hey @gothsome depending on what you are looking for, [galaxy](https://galaxy.ansible.com/ui/) is a good resource to see collections that might fit your needs. While not all collections ship with playbooks/roles, a lot of the [module documentation](https://docs.ansible.com/ansible/latest/collections/index.html) have examples of how the modules could be used in plays.

---

<div class="post-metadata">

**Author:** ![gothsome](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gothsome](https://forum.ansible.com/u/gothsome)\
**Post date:** [February 21, 2024, 8:09am UTC](https://forum.ansible.com/t/playbook-collection/3958/3 "2024-02-21T08:09:05Z")

</div>

Thank you!  
I thought of a collection of playboooks like a swiss army knife.  
I started to scratch everything i thought it could be useful like examples for setting up docker, make calculations.  
I looked at Galaxy but found rather thing called roles for installing certain services.  
How does these roles function? Like a Workflow Job Template?  
And where does those roles appear in AWX?

---

<div class="post-metadata">

**Author:** ![thedoubl3j](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/thedoubl3j/32/103_2.png) [@thedoubl3j](https://forum.ansible.com/u/thedoubl3j)\
**Post date:** [February 27, 2024, 4:23pm UTC](https://forum.ansible.com/t/playbook-collection/3958/4 "2024-02-27T16:23:59Z")

</div>

> I thought of a collection of playboooks like a swiss army knife.

They can be but I would expand upon that and say that its a swiss arrmy knife with its own dependencies included. I would say a role could be viewed more as swiss army knife.

> Blockquote I looked at Galaxy but found rather thing called roles for installing certain services.  
> How does these roles function? Like a Workflow Job Template?

Not really, roles can be viewed almost like building blocks for larger tasks. How I learned was we had a universal role that applied our security policies to our boxes. So all of our roles/playbooks that stood up new infra, we had to run that security role so that we met compliance. I view roles as rarely changed (some might get mad at that) and stable pieces of automation that are standards. “We stand up a lamp stack this way because of $company $rules” etc.

> And where does those roles appear in AWX?

Roles would be called in a Job Template from a project, similar to playbooks (because at the end of the day, they are surfaced to ansible that way). A short and concise way of viewing roles could be a playbook calling other playbooks, like an include. You can do more than just that like add variables etc to your roles (like you would your playbooks) but it introduces larger concepts like vars files etc.

---

<div class="post-metadata">

**Author:** ![gothsome](https://avatars.discourse-cdn.com/v4/letter/g/278dde/32.png) [@gothsome](https://forum.ansible.com/u/gothsome)\
**Post date:** [February 28, 2024, 8:48am UTC](https://forum.ansible.com/t/playbook-collection/3958/5 "2024-02-28T08:48:23Z")

</div>

so the Role is just a name for a certiain kind of template.  
I got confused by the name.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 29, 2024, 8:49am UTC](https://forum.ansible.com/t/playbook-collection/3958/6 "2024-03-29T08:49:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
