You can use the option --roles-path <path>.

On Fri, Mar 23, 2018 at 10:36 AM,  <[email protected]> wrote:
> 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, [email protected] 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 [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/182d1fde-121b-4f13-89cb-a9be324526cc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Marcos H. Alano
Linux System Administrator
[email protected]

-- 
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/CAO3Us%3Dm7cTDF_4HHsFv4sKpmRZQ9YATNvbBn0VrJ1FUHt79uYA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to