ansible skips roles alphabetically-wise

13 views
Skip to first unread message

Marcos Cano

unread,
Oct 21, 2016, 5:35:45 PM10/21/16
to Ansible Project
hello I'm calling roles from a custom location ( /var/lib/jenkins/workspace/some/job/workspace/playbook.yml rather that /etc/ansible path), I've exporte ANSIBLE_ROLES_PATH env variable 
roles: 
  - dotnet 
  - aws-kinesis-agent
  - aws_cli
  - monit
  - nginx

Ansible then executes the following roles: dotnet, aws-kinesis-agent and aws_cli, but skips monit and nginx role. However if I rename monit and nginx roles to something like "amonit" and "anginx"

roles: 
  - dotnet 
  - aws-kinesis-agent
  - aws_cli
  - amonit
  - anginx

Ansible executes them.


Also if I hardcode my roles_path it obviously executes the roles as expected. 


roles: 
  - /path/to/roles/dotnet 
  - /path/to/roles/aws-kinesis-agent
  - /path/to/roles/aws_cli
  - /path/to/roles/monit
  - /path/to/roles/nginx

Dick Davies

unread,
Oct 22, 2016, 7:09:10 AM10/22/16
to ansible list
I've never bothered setting ANSIBLE_ROLES_PATH and ansible just looks
for roles/ in the same folder
as the playbook.

Just drop the roles/ directory next to the playbook on the jenkins
worker and unset that variable.
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/db49b09a-546c-443d-bf34-cf3bc4d47d1e%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages