Hi,
I am wondering if there is a special setting for file.managed in order to work behind the proxy.
My test case:
I am using this state:
git://
github.com/saltstack-formulas/redis.gitand it fails during:
----------
State: - file
Name: /usr/local/redis-stable.tar.gz
Function: managed
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/state.py", line 1238, in call
*cdata['args'], **cdata['kwargs'])
File "/usr/lib/python2.7/dist-packages/salt/states/file.py", line 854, in managed
contents)
File "/usr/lib/python2.7/dist-packages/salt/modules/file.py", line 1647, in manage_file
sfn = __salt__['cp.cache_file'](source, env)
File "/usr/lib/python2.7/dist-packages/salt/modules/cp.py", line 229, in cache_file
result = __context__['cp.fileclient'].cache_file(path, env)
File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 115, in cache_file
return self.get_url(path, '', True, env)
File "/usr/lib/python2.7/dist-packages/salt/fileclient.py", line 346, in get_url
raise MinionError('Error reading {0}: {1}'.format(url, ex.reason))
MinionError: Error reading
http://download.redis.io/redis-stable.tar.gz: [Errno 110] Connection timed out
minion itself needs to use http proxy in order to download anything from internet.
http_proxy variables are in /etc/environment:
http_proxy="
http://87.254.212.120:8080"
https_proxy="
http://87.254.212.120:8080"
ftp_proxy="
http://87.254.212.120:8080"
HTTP_PROXY="
http://87.254.212.120:8080"
HTTPS_PROXY="
http://87.254.212.120:8080"
FTP_PROXY="
http://87.254.212.120:8080"
as well as in /etc/sudoers
Defaults env_keep += "http_proxy https_proxy ftp_proxy noproxy HTTP_PROXY HTTPS_PROXY FTP_PROXY NOPROXY"
By the way apt works great with proxy settings:
Acquire::http::Proxy "
http://87.254.212.120:8080";
As always any help highly appreciate it.
Best regards
Lukasz Jastrzebski