Error while fetching server API version: ('Connection aborted.', error(111, 'Connection refused'))

60 views
Skip to first unread message

Bhagyashri Shewale

unread,
Oct 29, 2020, 5:36:02 PM10/29/20
to Ansible Project
I don't want to pass docker tls variables to individual ansible roles instead I want to pass  as environment variables.

Where I can exactly define these variable. I tried to set host environment variable but still default variables are passed

DOCKER_CERT_PATH
DOCKER_HOST
DOCKER_TLS 
DOCKER_TLS_HOSTNAME 
DOCKER_TLS_VERIFY 

ansible version
ansible 2.8.6
  config file = None
  configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.15 (default, Jan 14 2020, 10:33:49) [GCC 6.4.0]

Docker version 19.03.12

Any help is very much appreciated!

Thanks

Dick Visser

unread,
Oct 30, 2020, 5:24:39 AM10/30/20
to ansible...@googlegroups.com
to avoid guessing what your playbook looks like, can you post it perhaps?
> --
> You received this message because you are subscribed to the Google Groups "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/5ee0bca3-770a-4389-b335-6ba9fc2e9da6n%40googlegroups.com.



--
Dick Visser
Trust & Identity Service Operations Manager
GÉANT

Bhagyashri Shewale

unread,
Oct 31, 2020, 7:34:35 PM10/31/20
to ansible...@googlegroups.com
Thanks for reaching out.

Here is a simple playbook and role to create a network 

playbook:
- hosts: xxxx
  roles:
    - network

role (main.yml)
---
  - name: Create Docker Web network
    docker_network:
      name: "{{ docker_network_web }}"

I have added TLS related environment variable on the host permanently but where and how do I add those references on the task.

P.S. I did add TLS parameters to my role and that works but I'm looking for an alternative solution instead of modifying 10 different roles, is there a single place where these variables can be referenced?


Thanks,
Bhagyashri


You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/PnZcnOqsRBA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwNOtbnhW6LkwKux%3DrbpOrXdrVMvOVLW%2BZQdnB0c4p3WMw%40mail.gmail.com.


--
Regards,
Bhagyashri

Dick Visser

unread,
Nov 1, 2020, 10:12:38 AM11/1/20
to ansible...@googlegroups.com

--
Sent from a mobile device - please excuse the brevity, spelling and punctuation.
Reply all
Reply to author
Forward
0 new messages