-
Notifications
You must be signed in to change notification settings - Fork 24.2k
Open
ansible/ansible-documentation
#3470Labels
P3Priority 3 - Approved, No Time LimitationPriority 3 - Approved, No Time Limitationaffects_2.20bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.
Description
Summary
The role_skeleton_ignore option in ansible.cfg is correctly parsed and visible in ansible-config dump, but files matching the configured regex patterns are still copied when running ansible-galaxy role init with a custom skeleton.
According to the documentation, role_skeleton_ignore should prevent files matching the regex patterns from being copied. However, this does not work in practice.
Issue Type
Bug Report
Component Name
ansible-galaxy
Ansible Version
ansible --version
ansible [core 2.20.1]
config file = /home/jilj0001/.ansible.cfg
configured module search path = ['/home/jilj0001/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /home/jilj0001/.local/share/pipx/venvs/ansible-core/lib/python3.13/site-packages/ansible
ansible collection location = /home/user/.ansible/collections:/usr/share/ansible/collections
executable location = /home/user/.local/bin/ansible
python version = 3.13.7 (main, Jan 8 2026, 12:15:45) [GCC 15.2.0] (/home/user/.local/share/pipx/venvs/ansible-core/bin/python)
jinja version = 3.1.6
pyyaml version = 6.0.3 (with libyaml v0.2.5)Configuration
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t allOS / Environment
Ubuntu 25.10
Steps to Reproduce
# 1. Create a custom skeleton with an extra file
mkdir -p ~/.ansible/role-skeleton
touch ~/.ansible/role-skeleton/CLAUDE.md
# 2. Configure ansible.cfg
cat > ~/.ansible.cfg << 'EOF'
[galaxy]
role_skeleton = ~/.ansible/role-skeleton
role_skeleton_ignore = ^CLAUDE\.md$
EOF
# 3. Verify config is loaded
ansible-config dump | grep GALAXY_ROLE_SKELETON_IGNORE
# Output: GALAXY_ROLE_SKELETON_IGNORE(/home/user/.ansible.cfg) = ['^CLAUDE\\.md$']
# 4. Create a new role
ansible-galaxy role init /tmp/test-role
# 5. Check if ignored file was copied
ls /tmp/test-role/Expected Results
CLAUDE.md should NOT be present in /tmp/test-role/ since it matches the ignore pattern.
Actual Results
CLAUDE.md IS copied to /tmp/test-role/ despite matching the configured ignore pattern.Code of Conduct
- I agree to follow the Ansible Code of Conduct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3Priority 3 - Approved, No Time LimitationPriority 3 - Approved, No Time Limitationaffects_2.20bugThis issue/PR relates to a bug.This issue/PR relates to a bug.has_prThis issue has an associated PR.This issue has an associated PR.