per-host proxy setting

Hi,

Can https_proxy be set on a per-host basis for e.g,

[nodes]
NFL-00053.abc.com ansible_ssh_port=16385 ansible_ssh_host=localhost https_proxy=http://192.168.101.1:3128

This doesn’t seem to work.

The https_proxy looks like needs to be setup as an environment variable in a playbook.

environment:
https_proxy: “{{ https_proxy }}”

But then this would apply to all hosts…

Can environment section be generated per-host from the inventory script?

I’m using ansible 2.3

thanks a lot for any guidance
Suresh

It wont since the https_proxy variable is only set on that one host.

Normally it should fail on host that don't have the variable https_proxy set, but if you test you'll see that it works.
If this is a feature or a bug I do not know