yes, you are doing this in right way, you can call role directly or you can 
parameterize the roles:
Example:

---

- hosts: localhost
  roles:
   - casl-ansible/roles/oc-apply

 - { role: casl-ansible/roles/oc-apply }

or if you wants to use any condition or variable to execute your role then you 
can parameterise your roles like this:

---

- hosts: localhost
  roles:
  - { role: casl-ansible/roles/oc-apply, when: <"ansible_os_family == 
'RedHat'">  }

On Wednesday, August 23, 2017 at 5:57:10 PM UTC+5:30, josp...@redhat.com 
wrote:
>
> I found a work-around, but I am not sure if it is the correct way to 
> handle this.
>
> After installing via ansible-galaxy as described above, I used the 
> following playbook to run the role:
>
> ---
> - hosts: localhost
>   roles:
>   - { role: 'casl-ansible/roles/oc-apply' }
>
>
> Anyone have a better solution?
>
> Thanks,
>
> Deven
>

-- 
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/775ef672-e513-40e8-8a54-8152f8beca7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to