Name Conflicts: Role Task File Names Conflict with Modules

I’ve got the following:

`

ansible.cfg

library = ~/.ansible/roles
`

$ ls -la ~/.ansible/roles/L-P.acmetool/tasks/ total 24 drwxrwxr-x 2 karl karl 4096 Nov 28 18:59 . drwxrwxr-x 7 karl karl 4096 Nov 28 18:50 .. -rw-rw-r-- 1 karl karl 756 Nov 28 17:21 hooks.yml -rw-rw-r-- 1 karl karl 246 Nov 28 18:59 main.yml -rw-rw-r-- 1 karl karl 373 Nov 28 17:21 service.yml -rw-rw-r-- 1 karl karl 908 Nov 28 17:21 setup.yml

After installing the above acmetool role, I get the following error trying to run a playbook that includes it:

`
PLAY [Bootstrap Ubuntu Hosts with Python 2.7] **********************************

TASK [raw] *********************************************************************
ok: [eddings.justdavis.com]

PLAY [Configure Systems] *******************************************************

TASK [setup] *******************************************************************
fatal: [eddings.justdavis.com]: FAILED! => {“failed”: true, “msg”: “module (setup) is missing interpreter line”}

NO MORE HOSTS LEFT *************************************************************
to retry, use: --limit @./site.retry

PLAY RECAP *********************************************************************
eddings.justdavis.com : ok=1 changed=0 unreachable=0 failed=1

`

It turns out that the role’s task files conflict with builtin modules. If I rename the setup.yml file in the folder (and adjust the include for it), the above error goes away. I end up having to do the same with the service.yml file, too.

From a search of this mailing list, it seems that distributing modules via Galaxy is supported, so I assume that my above library directive in ansible.cfg is kosher. Is this conflict an intentional limitation, or a bug? To me, it’s very surprising behavior, so I’d classify it as a bug. Why would Ansible try to load modules from the tasks/ directory in a random role? But maybe I’m missing something, so I figured I’d ask here first before filing an issue.

Thanks!
Karl