Closed njt-cla closed 6 months ago
To give more information, I tried forking your repo and change "pkg-windows.yml" file to use a proxy like that :
- name: Download windows datadog agent 614 fix script
win_get_url:
url: "{{ datadog_windows_614_fix_script_url }}"
dest: '%TEMP%\fix_6_14.ps1'
proxy_url: "{{ HTTP_PROXY }}"
when: not agent_datadog_skip_install and datadog_apply_windows_614_fix
# ...
- name: Download windows datadog agent
win_get_url:
url: "{{ agent_dd_download_url }}"
dest: '%TEMP%\ddagent.msi'
proxy_url: "{{ HTTP_PROXY }}"
register: agent_download_msi_result
when: (not agent_datadog_skip_install) and (not ansible_check_mode)
# ...
Changing this and running back my playbook command (ansible-playbook playbook.yml -i my-inventory -l myserver -f 5 --private-key my.key -u myuser -v -e HTTP_PROXY=http://proxy.fqdn:proxy.port/ -e HTTPS_PROXY=http://proxy.fqdn:proxy.port/) is working for an unauthenticated proxy usage.
Hi @njt-cla :wave:. I put together PR https://github.com/DataDog/ansible-datadog/pull/553 that should help you - I'd be curious if you could provide feedback on it. First of all, it uses lowercase environment variable names (as recommended in official Ansible docs). Second, it also tells Ansible to omit the proxy_url value if http_proxy is not defined.
Let me know if you think this makes sense, thanks!
Hello, thanks for your fast answer. It seems to correct the issue I had. I close the Issue. Thanks :)
Hello, I have tried to install Datadog Agent on a Windows Server that has no direct access to internet. It is available through a Proxy. When trying to run the playbook to install Datadog Agent on a Windows Server, it fails because of this :
Your role is executed from this playbook (with a requirements.yml file that points on the main branch of this repository) :
The playbook is executed using this command :
These environment variables are visible in the Gather Facts command that runs at the beginning of the Playbook execution, but it is not used by the win_get_url module.
Is it possible to add a way to use a proxy in win_get_url commands you run for a Windows install ?
Thanks by advance.
Regards.