From 0907c178bb3241a824ae77a67e15f236b39157f0 Mon Sep 17 00:00:00 2001 From: Aneesh Joseph Date: Sun, 24 Jul 2016 00:44:49 +0530 Subject: [PATCH] update galaxy docs update galaxy docs to indicate that multiple roles can be downloaded from the same source --- docsite/rst/galaxy.rst | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docsite/rst/galaxy.rst b/docsite/rst/galaxy.rst index 65d3b4f784..a6e218a7f8 100644 --- a/docsite/rst/galaxy.rst +++ b/docsite/rst/galaxy.rst @@ -130,7 +130,29 @@ And here's an example showing some specific version downloads from multiple sour version: 0.1.0 As you can see in the above, there are a large amount of controls available -to customize where roles can be pulled from, and what to save roles as. +to customize where roles can be pulled from, and what to save roles as. + +You can also pull down multiple roles from a single source(just make sure that you have a meta/main.yml file at the root level). +:: + meta\main.yml + common-role1\tasks\main.yml + common-role2\tasks\main.yml + +For example, if the above common roles are published to a git repo, you can pull them down using: +:: + # multiple roles from the same repo + - src: git@gitlab.company.com:mygroup/ansible-common.git + name: common-roles + scm: git + version: master + +You could then use these common roles in your plays +:: + --- + - hosts: webservers + roles: + - common-roles/common-role1 + - common-roles/common-role2 Roles pulled from galaxy work as with other SCM sourced roles above. To download a role with dependencies, and automatically install those dependencies, the role must be uploaded to the Ansible Galaxy website.