Remove the Blank Play Variable That Hides Ansible's Proxy Map
Inventory group variables lose to a play-level declaration even when that declaration is empty or null.
If group_vars defines a proxy mapping but the task receives an empty value, look for the same variable declared in the play. A play variable has higher precedence; an empty placeholder still overrides inventory.
For an external download allowed to use a public HTTP proxy, the HTTP proxy list supplies candidate addresses for the inventory values. Keep the mapping in inventory:
proxy_env:
http_proxy: http://proxy.example.net:8080
https_proxy: http://proxy.example.net:8080Then apply it to the intended task without a play-level proxy_env: placeholder:
environment: "{{ proxy_env | default({}) }}"If a role needs a fallback, an empty mapping in role defaults sits below inventory values and lets inventory win.
The filter shown handles undefined, not every empty-looking state. Explicit null is already defined, so ordinary default({}) does not erase that higher-precedence override.
Check the effective value for the affected host before changing the proxy endpoint. The environment directive supplies a task's inputs only after variable precedence has selected the mapping it evaluates.