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
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/c979c52e-d5ef-49ef-9d6c-ff7ed15edf7b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.