Hi,
I used the below option after copying the rules from git and it worked for 
me.

*- hosts: all
  roles:
    - server
    - /path/to/my/roles/common
    - /path/to/my/client_roles/client*

*My intention was to use roles from different locations in a playbook*

On Wednesday, February 12, 2020 at 5:49:08 PM UTC+5:30, Dick Visser wrote:

Hi
>
> What do you mean by “a single ansible”?
>
> In any case where a role came from (git, in your case) is not relevant, 
> just make sure they are available locally. 
> The roles docs are reasonably clear:
>
>
> https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html
>
>
>
> On Wed, 12 Feb 2020 at 06:57, sanctc <[email protected] <javascript:>> 
> wrote:
>
>> Hi Folks,
>> Can I use roles from several different git repos/locations to single 
>> ansible?
>> e.g. 
>> ---
>> - hosts: myhost
>>   roles:
>>     - role1: '/path/to/my/roles/common'
>>     - role2: '/usr1/to/my/roles/client'
>>     - role3: '/usrpath/to/my/roles/server'
>>
>> What would be the best way to use roles from different locations?
>>
>> Thanks,
>> Santosh
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/3031f4c9-ea37-4032-b971-4668b5e55e7c%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/3031f4c9-ea37-4032-b971-4668b5e55e7c%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
> -- 
> Sent from a mobile device - please excuse the brevity, spelling and 
> punctuation.
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e6bd0c21-0b0c-434b-af4f-0709e76fdbb5%40googlegroups.com.

Reply via email to