Benjamin, Mike:
Thanks for your replies and your advices. 
Now I know I need to reorganize a bit mi playboks and try to follow the 
Ansible best practices more closely.

Thanks in advance!!

Max

El lunes, 21 de marzo de 2016, 12:02:18 (UTC-3), Mike Biancaniello escribió:
>
> I agree that it's annoying, especially if you try to organize by includes 
> and reusable playbooks, it's hard to tell, looking at a list of *.yml files 
> which ones are the top-level and which are meant to be included.
>
> If you're not using roles and only using tasks, you can put your tasks in 
> a tasks/ subfolder and then include them and everything will use the dir 
> of the playbook as the ansible root.
>
> However, if you're using roles, the roles are assumed to be in a subdir of 
> the playbook, so you can either create a playbooks/ subdir and reference 
> your roles like: 
>
> ./stuff.yml
> ---
> - include: playbooks/wtfstuff.yml
>
> playbooks/wtfstuff.yml
> --
> - name: Do wtf stuff
>
>   roles: 
>   - role: ../roles/wtf
>
> or put roles as a subdir of your playbook subdir and then require that any 
> top-level playbooks must only include playbooks from the playbooks/ subdir:
> project
> ├── inventory
> ├── site.yml
> └── playbooks
>     ├── ansible.cfg
>     ├── webservers.yml
>     ├── databases.yml
>     └── roles
>         ├── nginx
>         ├── php
>         └── mysql
>
>
>

-- 
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/def98cdc-11a6-43de-ae1e-ad3283fc7633%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to