Is the folder where galaxy upload the roles locally on your machine part of 
the path that ansible-playbook will look for to find a role ?

On Friday, March 23, 2018 at 11:52:20 AM UTC+1, cmou...@redhat.com wrote:
>
> Hi
>
> Is there a document describing the best practices to organise a complex 
> Ansible project ?
>
> Here is the project that I'm thinking about :
>  
> - Project has been designed as a collection of reusable modules (= role) 
> which are living under by example this folder "complexproject/roles" fo the 
> modules part of the main project
> - Project could include roles created and managed by external teams and 
> git cloned locally under "complexproject/imported/projectA/roles, 
> complexproject/imported/projectB/roles" 
> - Users access the main playbooks using this command "ansible-playbook -i 
> inventory complexproject/playbooks/main.yml 
> - main.yml file contains roles tagged to be called
>
> E.g.
> ---
> - hosts: "{{ openshift_node }}"
>   gather_facts: "{{ gathering_host_info | bool == true }}"
>
>   roles:
>     - { role: 'enable_cluster_admin', tags: 'enable_cluster_admin', when: 
> target_platform == 'cloud' }
>     - { role: 'create_projects',      tags: 'create_projects'}
>     - { role: 'persistence',          tags: 'persistence',          when: 
> target_platform == 'cloud' }
>
> Questions
> - Is this approach coherent/consistent ?
> - Can we set up a var to tell to Ansible where all the roles are located: 
> complexproject/roles:complexproject/imported/projectA/roles:complexproject/imported/projectB/roles
> - Should we adopt a different approach where different projects which 
> contain roles are imported using "import_playbook" --> see 
> `openshift-ansible` project - https://goo.gl/KXDWXN ?
>
> Regards
>
> Charles
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/182d1fde-121b-4f13-89cb-a9be324526cc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to