# Ansible Collection Skeleton

**URL:** <https://forum.ansible.com/t/ansible-collection-skeleton/3508>\
**Category:** Get Help\
**Tags:** galaxy, collections\
**Created:** [January 29, 2024, 11:50am UTC](https://forum.ansible.com/t/ansible-collection-skeleton/3508 "2024-01-29T11:50:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![falon](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/falon/32/2081_2.png) [@falon](https://forum.ansible.com/u/falon)\
**Post date:** [January 29, 2024, 11:50am UTC](https://forum.ansible.com/t/ansible-collection-skeleton/3508/1 "2024-01-29T11:50:03Z")

</div>

Hello, I’m trying to write my own collection skeleton. I’m trying to start with the default one. But it doesn’t work even if I call it from `--collection-skeleton`:

```auto
# ansible-galaxy collection init --force --collection-skeleton /usr/local/lib/python3.11/site-packages/ansible/galaxy/data/default/collection/ my.pappo
ERROR! template error while templating string: Could not load "comment_ify": 'comment_ify'. String: ### REQUIRED
{% for option in required_config %}
[...]

```

My environent is:

```auto
ansible [core 2.16.2]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.11/site-packages/ansible
  ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.11.5 (main, Sep 7 2023, 00:00:00) [GCC 11.4.1 20230605 (Red Hat 11.4.1-2.1.0.1)] (/usr/bin/python3.11)
  jinja version = 3.1.3
  libyaml = True

```

The same happens if I copy the path `/usr/local/lib/python3.11/site-packages/ansible/galaxy/data/default/collection/` in a new folder and I call it with “–collection-skeleton”. I think I’m missing something about the right way to write new collection skeletons.

Could you help me to understand?  
Thank you very much  
Kind Regards  
Marco

---

<div class="post-metadata">

**Author:** ![shertel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/shertel/32/1241_2.png) [@shertel](https://forum.ansible.com/u/shertel)\
**Post date:** [January 29, 2024, 2:02pm UTC](https://forum.ansible.com/t/ansible-collection-skeleton/3508/2 "2024-01-29T14:02:03Z")

</div>

The default collection’s galaxy.yml.j2 uses an internal filter (`comment_ify`) that explicitly specified skeletons don’t have access to. You can use the default skeleton by omitting the --collection-skeleton /path/to/skeleton. The syntax is right for providing a custom skeleton. Any of the non-default skeletons should be valid starting point for a custom skeleton since they won’t use the internal filter.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [February 28, 2024, 2:02pm UTC](https://forum.ansible.com/t/ansible-collection-skeleton/3508/3 "2024-02-28T14:02:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
