summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorazenk <andrew@andrewzenk.com>2017-03-01 19:23:18 -0600
committerChris Houseknecht <chouseknecht@ansible.com>2017-03-01 20:23:18 -0500
commitbdf0ab451e6796a7055b7d238d9b3ab7906473e9 (patch)
tree778a2b2900317697144dad6cfdc38e07d3a52848 /docs
parentfffb4992b5e3f4c394854603e18e45d33c18bc0d (diff)
downloadansible-bdf0ab451e6796a7055b7d238d9b3ab7906473e9.tar.gz
Add role skeleton support (#17079)
* Add role skeleton support The default role skeleton used by ansible-galaxy is good, but it doesn't allow organizations to customize it to suit their needs. This patch addresses that by adding the option to point ansible-galaxy at a role skeleton directory. The contents of this directory are then copied (or rendered) into the output role directory. Appropriate command line options and configuration entries are added to allow for further customization from the role skeleton. * Remove dependency on platforms list from test Platforms are no longer provided to the template by galaxy init. Removing the code in our test meta/main.yml template that relied on it. * Fix whitespace issue
Diffstat (limited to 'docs')
-rw-r--r--docs/docsite/rst/galaxy.rst26
1 files changed, 25 insertions, 1 deletions
diff --git a/docs/docsite/rst/galaxy.rst b/docs/docsite/rst/galaxy.rst
index 0e243e6cf3..598aba6213 100644
--- a/docs/docsite/rst/galaxy.rst
+++ b/docs/docsite/rst/galaxy.rst
@@ -211,7 +211,31 @@ If you are creating a Container Enabled role, use the *--container-enabled* opti
with default files appropriate for a Container Enabled role. For instance, the README.md has a slightly different structure, the *.travis.yml* file tests
the role using `Ansible Container <https://github.com/ansible/ansible-container>`_, and the meta directory includes a *container.yml* file.
-Search for roles
+Using a Custom Role Skeleton
+============================
+
+A custom role skeleton directory can be supplied as follows:
+
+::
+
+ $ ansible-galaxy init --role-skeleton=/path/to/skeleton role_name
+
+When a skeleton is provided, init will:
+
+- copy all files and directories from the skeleton to the new role
+- any .j2 files found outside of a templates folder will be rendered as templates. The only useful variable at the moment is role_name
+- The .git folder and any .git_keep files will not be copied
+
+Alternatively, the role_skeleton and ignoring of files can be configured via ansible.cfg
+
+::
+
+ [galaxy]
+ role_skeleton = /path/to/skeleton
+ role_skeleton_ignore = ^.git$,^.*/.git_keep$
+
+
+Search for Roles
----------------
Search the Galaxy database by tags, platforms, author and multiple keywords. For example: