Run Http GET from Ansible to remote server by connecting via localhost

Hello,

I am creating an ansible-playbook which is doing HTTP GET to a remote elastic server. The problem is that this ES server doesn't accept any other connection apart from localhost. Is there a way how to connect to the remote ES server and execute the curl command with localhost ?

- name: check current version
  uri: url=http://localhost:{{ es_http_port }} method=GET
  register: version_found
  retries: 10
  delay: 10

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.