splunk / splunk-ansible

Ansible playbooks for configuring and managing Splunk Enterprise and Universal Forwarder deployments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use of proxies during the playbook execution

CyrilleFranchet opened this issue · comments

Hi,

I'm currently using a Docker Splunk instance and I would like to install apps with SPLUNK_APPS_URL. In my environment I need to specify a proxy to join Internet resources.
It works by passing HTTP_PROXY and HTTPS_PROXY vars during the execution of inventory/environ.py but then the variable SPLUNK_ANSIBLE_ENV needs to be used to pass the proxy configuration during the execution of the playbook.

It works but module uri is configured without the parameter "use_proxy: no" so the playbook tries to use the proxy to join the splunkd daemon on localhost.

I think that "use_proxy: no" should be added on every call to the localhost instance. But what has to be done with the others Splunk URL like license master for example? Using "use_proxy: no" would break it.

Variable NO_PROXY could be used for this matters to handle special URL like license master but the parsing of SPLUNK_ANSIBLE_ENV seems to be incorrect to handle it.

I can push a PR but I don't which way you want to go with this kind of issue.

It sounds like we'd need to explicitly set use_proxy: no on all the localhost/127.0.0.1/intra-deployment services. Are you using k8s at all to run these containers? I'm slightly worried various service mesh implmentations might cause problems with this change, but I guess it would depend on if those proxies are transparent or not.