Hacker News new | ask | show | jobs
by rmetzler 778 days ago
An Ansible playbook is usually the main entrypoint, it consists of a list of plays. Each play has hosts and a list of tasks to run at them.

Because people wanted to reuse their code, the abstraction of roles was created. A role is something like „setup basic OS stuff“, „create this list of users“, „setup a Webserver“, „setup a database“. The association, which roles to run on which machine still happens in the playbook.

1 comments

I'm using include_tasks: and import_playbook:, like an animal :)
You can't share a set of tasks on Ansible Galaxy without wrapping it in a role