Hi

Thanks for the comments. It would help tho, if I had explained the issue in 
a coherent way. :(

Let me rephrase:

I still got a service to install.
But it's in a bunch of boxes that we'll call 'client-group' (client1, 
client2...).
I still got a 'master' box that needs to be contacted for each 'client#' 
box.

So ansible should loop over the client-group and do:

  - install on client#
  - contact 'master' to relay the hostname of 'client#' and get an install 
string
  - go back to 'client#' and perform a sync with this string.

The problem comes when I declare in a play:

hosts: client-group

>From then on, it seems to me impossible to contact any other machine than 
what is declared on the 'hosts' line.

So that's why I did ask for help with lookups, but not sure at all, how 
that would work.

I ended up doing this with a loop in a shell  script. Ugly but works...

On Saturday, 31 May 2014 17:26:00 UTC+1, Michael DeHaan wrote:
>
> "Let's say I've got a service that I need to install on a machine that 
> we'll call 'client' and for that to work it has to get some parameter from 
> a box called 'master'."
>
> Just gather this parameter via a fact or run a seperate play first to save 
> that result for that particular host.
>
> delegate_to from 500 machines to a common machine can result in a bit of 
> DDOS, and is usually not the answer.
>
>
>
> On Fri, May 30, 2014 at 1:46 PM, Nathan Howell <[email protected] 
> <javascript:>> wrote:
>
>> My thought would be to use delegate_to to call a script on master that 
>> returns the string that the client needs.
>>
>> Nathan
>>
>>
>> On Friday, 30 May 2014 02:56:20 UTC-7, Makimoto Marakatti wrote:
>>>
>>> Hi all
>>>
>>> Let's say I've got a service that I need to install on a machine that 
>>> we'll call 'client' and for that to work it has to get some parameter from 
>>> a box called 'master'.
>>>
>>> For this to work under ansible it would need to:
>>>
>>>   - install on 'client'
>>>   - contact 'master' to relay the hostname of 'client' and get an 
>>> install string
>>>   - go back to 'client' and perform a sync with this string.
>>>
>>> So I thought the best way to approach this would be lookups. But can't 
>>> figure out the syntax for this, or even if this would be the right approach?
>>>
>>> (I can actually make this work with a shell script easily, but thought 
>>> that ansible would be the right tool to get things standardized)
>>>
>>> Any insights greatly appreciated...
>>>
>>  -- 
>> 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 post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/1ee33787-0e33-4f0f-98b0-9384444e0348%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/1ee33787-0e33-4f0f-98b0-9384444e0348%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/f8f282c5-a9d6-43e9-a3fa-884802935225%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to