I have a custom hostvar called server_dependson defined in my inventory. 
The thinking is that each server will have a server it is dependent on.
Therefore when running updates and rebooting (Windows servers) I want to be 
able to specify that certain servers be updated and rebooted based on 
dependency.

My initial thought was to have a nested loop, outer loop with 
inventory_hostname and inner with server_dependson. Within the loop it 
would compare the server_dependson with the current inventory_hostname from 
the outer loop. If it matched then it would add the inventory_hostname to a 
list after the server it depended on. This way at the end of the loops I 
would have a sorted list of servers to feed to tasks in the list's order.

Any ideas about how to achieve this?

-- 
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/0e7f6989-3c84-4c36-87c8-394920611724%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to