Showing results for 
Search instead for 
Did you mean: 

Connection Refused error when running Ansible Playbook


I'm trying to run an Ansible playbook to create a new local user account on a Big-IP VE running using the bigip_user module. I'm able to run tasks using bigip_device_info and bigip_config modules successfully, but whenever I try to run a playbook with a module to change settings (i.e. bigip_user or bigip_snmp_community) it errors out with the message: "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: urllib.error.URLError: <urlopen error [Errno 111] Connection refused>"


I'm new to Ansible on Big-IP platform. Any help on this is greatly appreciated.




--- - name: Add users playbook   hosts: "{{ devices }}"   strategy: free   order: sorted   connection: local   gather_facts: no   become: no   become_method: enable   ignore_errors: no   collections:     - f5networks.f5_modules   vars:     provider:       server: "{{ ansible_host }}"       user: <username>       password: <password>       validate_certs: no       server_port: 443   tasks:   - name: Add or update the user     bigip_user:   provider: "{{ provider }}"   username_credential: user   password_credential: password   update_password: always   full_name: User   shell: bash   partition_access:     - all:admin   state: present     delegate_to: localhost




The full traceback is: Traceback (most recent call last):   File "/usr/local/lib/python3.7/urllib/", line 1350, in do_open     encode_chunked=req.has_header('Transfer-encoding'))   File "/usr/local/lib/python3.7/http/", line 1277, in request     self._send_request(method, url, body, headers, encode_chunked)   File "/usr/local/lib/python3.7/http/", line 1323, in _send_request     self.endheaders(body, encode_chunked=encode_chunked)   File "/usr/local/lib/python3.7/http/", line 1272, in endheaders     self._send_output(message_body, encode_chunked=encode_chunked)   File "/usr/local/lib/python3.7/http/", line 1032, in _send_output     self.send(msg)   File "/usr/local/lib/python3.7/http/", line 972, in send     self.connect()   File "/usr/local/lib/python3.7/http/", line 1439, in connect     super().connect()   File "/usr/local/lib/python3.7/http/", line 944, in connect     (,self.port), self.timeout, self.source_address)   File "/usr/local/lib/python3.7/", line 728, in create_connection     raise err   File "/usr/local/lib/python3.7/", line 716, in create_connection     sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused







I have a similar error, though I don't get a connection refused issue.

The error was: urllib.error.URLError: <urlopen error timed out>

Did you ever find a fix to your issue, Edson?