Search code examples
chef-infracookbook

How to set http_proxy for chef remote_file resource


I am looking for help where I need to download binaries from chef-cookbook from https url and I can not make a direct call to the url from client server.

I am able to download it using curl but after passing proxy server with port. But I want to use remote_file resource and I am not able to set the proxy for my https url as there is no option with in remote file.

can someone please help me with.

Thanks in advance


Solution

  • you will need to set the proxy setting in chef-client configuration

    http_proxy The proxy server for HTTP connections. Default value: nil.

    http_proxy_pass The password for the proxy server when the proxy server is using an HTTP connection. Default value: nil.

    http_proxy_user The user name for the proxy server when the proxy server is using an HTTP connection. Default value: nil.

    you might like to leverage chef-client cookbook to set these settings