Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/docsite/rst/dev_guide/developing_collections_creating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ To initialize a collection using the new template, pass the path to the skeleton
ansible_collections#> ansible-galaxy collection init --collection-skeleton /path/to/my/namespace/skeleton --extra-vars "@my_vars_file.json" my_namespace.my_collection
You can configure the collection skeleton using ``collection_skeleton`` in ``ansible.cfg``.
To ignore files and directories in the collection skeleton, use the ``collection_skeleton_ignore`` option in ``ansible.cfg``.

.. code-block:: ini
[galaxy]
collection_skeleton = /path/to/collection_skeleton
collection_skeleton_ignore = ^.git$,^.*/.git_keep$,^\./CLAUDE\.md$
The ``collection_skeleton_ignore`` option is a list of regular expressions to match files and directories to ignore.
The regex are matched against the relative path of the file or directory from the skeleton directory.

.. note::

Before ``ansible-core`` 2.17, collection skeleton templating is limited to the few hardcoded variables including ``namespace``, ``collection_name``, and ``version``.
Expand Down
9 changes: 6 additions & 3 deletions docs/docsite/rst/galaxy/dev_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,18 @@ 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
- The ``.git`` folder and any ``.git_keep`` files will not be copied

Alternatively, the role_skeleton and ignoring of files can be configured with ansible.cfg
Alternatively, ``ansible.cfg`` can be used to configure the role skeleton and files to ignore.

.. code-block:: text
[galaxy]
role_skeleton = /path/to/skeleton
role_skeleton_ignore = ^.git$,^.*/.git_keep$
role_skeleton_ignore = ^.git$,^.*/.git_keep$,^\./CLAUDE\.md$
The ``role_skeleton_ignore`` option is a list of regular expressions to match files and directories to ignore.
The regular expressions are matched against the relative path of the file or directory from the skeleton directory.

Authenticate with Galaxy
------------------------
Expand Down