So I used to have one fairly long main.yml playbook that was used to perform a number of similar-tasks, one of which was to install rbenv, the ruby management tool.
---
- name: create group titled deploy
group: name=deploy state=present
- name: update apt-cache
sudo: yes
apt: update_cache=yes
- name: create deploy user
user: name=deploy group=deploy groups=sudo comment="Deployment User" home="/home/deploy" shell="/bin/bash"
- name: download rbenv
...
- name: install rbenv
...
- name: configure rbenv
...
- name: Install the kitchen sink
action: apt name={{item}} state=present update_cache=true
sudo: yes
with_items:
- libqtwebkit-dev
- node
- lots of other tasks
...
I found a nice galaxy role that better suits my needs for installing rbenv, and I now want to include it to run in the same order as previously, but I am confused as to how the documentation recommends to do this and the syntax (seemingly with dependencies or includes?). It is hard to decipher wether I will have to split it into three roles (the pre-rbenv, rbenv, post-rbenv) which would really seem inconvenient as the three would always be used together. I suspect this is a pretty common dilemma...
Thank you all for the help so far, this forum has really made is a pleasure learning ansible.