On Monday, August 11, 2014 6:02:32 PM UTC-4, Michael DeHaan wrote:
>
> I'm not sure I understand this particular question.
>
> When you say hosts file, is this about restructuring your ansible 
> inventory file?
>
 
Yes.  Let me try to explain it better. 
 
I guess what I am asking is if whether Ansible has an internal variable 
that is set to the current host being processed, which can be set in the 
plays so that another different host gets processed instead.   
 
 
   
 
 
 
 

>
>
> On Mon, Aug 11, 2014 at 5:18 PM, Tiglath <[email protected] <javascript:>> 
> wrote:
>
>> I have a list of servers to migrate, say:
>>  
>> old_server_1
>> old_server_2 
>>  
>> and a list of new servers, say:
>>  
>> new_server_1
>> new_server_2
>>  
>> Because the names of the new servers are still undecided I want to use 
>> the old names in the hosts file, keep a server's new name as a variable in 
>> host_vars (newname) and then convert the old to new dynamically before 
>> comms start.  
>>  
>> Now, Ansible deploy to the names in the inventory file, but is there a 
>> way in which internally I can substitute, say old_server_1.newname for 
>> new_server_1?   
>>  
>> Thanks
>>  
>>  
>>
>> -- 
>> 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/27dd466e-307a-4f91-ae6d-0a400c9f5b06%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/27dd466e-307a-4f91-ae6d-0a400c9f5b06%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/dbb26048-f4ff-49b3-8a73-1951969e182f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to