Using delegate_to in combination with roles in a playbook

1,038 views
Skip to first unread message

Paul Harvey

unread,
Jun 16, 2014, 4:54:52 AM6/16/14
to ansible...@googlegroups.com
Hi,

Is it possible to delegate the execution of an *entire play* to a another host?   

I have a playbook that contains a set of reusable roles, the tasks in these roles will not generally be delegated.  However in this case I need to run the entire playbook delegated to a different host.

So either I need mechanism to "globally" delegate the execution of my playbook, or else a way to mark each of the roles when included in my playbook to have all of their tasks similarly delegated.

Is this functionality supported by Ansible? 

Thanks,

Paul.

James Cammarata

unread,
Jun 16, 2014, 11:31:53 AM6/16/14
to ansible...@googlegroups.com
Why not simply specify the 'hosts:' in that play as the ones you are wishing to delegate the tasks? If you need that to be more dynamic, you can use the group_by module to create the targeted group, and you can also use a variable for the 'hosts:'.


--
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-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/b7ae8e1e-4fa1-45ea-abbd-4f3b2a0c0215%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages