Deployment playbooks, tasks, and the best way to build this?

Hi all,

I have a use case that I’m trialing ansible for and I’m having trouble building it in a clean way without duplication. I thought I’d come to the list and ask for advice.

I have some generic stuff that happens for all of our application deployments, but are slightly different for each application (version and name). On top of that I have other steps like installing a repo file and custom steps for each application after the generic stuff.

What I have right now is this playbook, deploy.yml:

You can use includes with parameters to achieve this.

tasks:

  • include: path/to/base_include.yml a=1 b=2 c=3

  • include: path/to/base_include.yml a=1 b=2 c=3