Hi,
I have a little problem with conditionally setting a proxy.
situation:
- many systems in different domains (since hosting env)
- two domains are internal and only get outside connection via a proxy
So, I need no proxy set for all systems that aren't in those domains.
For those two domains, the proxy should be assigned.
What I have:
in group_vars/all:
---
ansible_python_interpreter: /usr/local/bin/python
proxies:
http_proxy:
http://no-proxy
now, the confusing part.
When I run this, I see the node *is* being assigned to the group, but not getting the proxy from the group_var.
I added one in all, and yes, it gets that one.
Also, it seems to be a problem if i refer to environment: proxies since they only apply to 30 of the systems. All the others don't have one
How do I do that without duplicating code? (run one play for proxied, based on the domain and one for the others? Sounds wrong)
The docs actually have an example for setting proxies, which is nice, but it's just too trivial to help with this :(
any help very appreciated.