How to create conditional copy in Ansible based on network (subnet) membership
问题 I want to copy one version of a file to a server if it has an interface in a specific subnet, or a different version if it does not have an interface in that subnet. Below is a working, but I think less than optimal solution. I'm hoping there is a better way that meets the following criteria... stays dynamic (use facts, I don't want to have to manually set variables for every server and manually create groups for servers in and not in the subnet) less repetitive (could it be handled in one