diff options
author | Jordan Borean <jborean93@gmail.com> | 2019-07-23 06:50:46 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-23 06:50:46 +1000 |
commit | 65049620eedba1f3f33e5ade0704ccf6fd14c48b (patch) | |
tree | d21a18e7de142f99934724e1e7fad241079daa39 /docs/templates | |
parent | 28b9f71640ca945ded810fc149dfc12d8123188b (diff) | |
download | ansible-65049620eedba1f3f33e5ade0704ccf6fd14c48b.tar.gz |
Generate galaxy.yml based on single source of truth (#59170)
* Generate galaxy.yml based on single source of truth
* Fix up tests and align file names
* Minor Makefile tweak
* Remove link in galaxy.yml file and make it a template file
* Moved collections docs to dev_guide
* change Makefile clean path
* Added readme to example meta file
* review fixes
* Use newer style for doc generation script
* Fix mistake in dev_guide index
* removed uneeded file, fixed links and added preview banner
* Moved banner for sanity test
Diffstat (limited to 'docs/templates')
-rw-r--r-- | docs/templates/collections_galaxy_meta.rst.j2 | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/docs/templates/collections_galaxy_meta.rst.j2 b/docs/templates/collections_galaxy_meta.rst.j2 new file mode 100644 index 0000000000..87c530e076 --- /dev/null +++ b/docs/templates/collections_galaxy_meta.rst.j2 @@ -0,0 +1,74 @@ +.. _collections_galaxy_meta: + +************************************ +Collection Galaxy Metadata Structure +************************************ + +.. important:: + This feature is available in Ansible 2.8 as a *Technology Preview* and therefore is not fully supported. It should only be used for testing and should not be deployed in a production environment. + Future Galaxy or Ansible releases may introduce breaking changes. + +A key component of an Ansible collection is the ``galaxy.yml`` file placed in the root directory of a collection. This +file contains the metadata of the collection that is used to generate a collection artifact. + +Structure +========= + +The ``galaxy.yml`` file must contain the following keys in valid YAML: + +.. raw:: html + + <table border=0 cellpadding=0 class="documentation-table"> + {# Header of the documentation -#} + <tr> + <th>Key</th> + <th width="100%">Comments</th> + </tr> + {% for entry in options %} + <tr> + {# key name with required or type label #} + <td> + <b>@{ entry.key }@</b> + <div style="font-size: small"> + <span style="color: purple">@{ entry.type | documented_type }@</span> + {% if entry.get('required', False) %} / <span style="color: red">required</span>{% endif %} + </div> + </td> + {# Comments #} + <td> + {% if entry.description is string %} + <div>@{ entry.description | replace('\n', '\n ') | html_ify }@</div> + {% else %} + {% for desc in entry.description %} + <div>@{ desc | replace('\n', '\n ') | html_ify }@</div> + {% endfor %} + {% endif %} + </td> + </tr> + {% endfor %} + </table> + <br/> + +Examples +======== + +.. code-block:: yaml + + namespace: "namespace_name" + name: "collection_name" + version: "1.0.12" + readme: "README.md" + authors: + - "Author1" + - "Author2 (https://author2.example.com)" + - "Author3 <author3@example.com>" + dependencies: + "other_namespace.collection1": ">=1.0.0" + "other_namespace.collection2": ">=2.0.0,<3.0.0" + "anderson55.my_collection": "*" # note: "*" selects the highest version available + license: + - "MIT" + tags: + - demo + - collection + repository: "https://www.github.com/my_org/my_collection" |