You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With provider configure with transport cli, we receive an error of Name or service not known because it tries to connect to inventory_hostname instead of connect to its value.
The full traceback is:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 158, in run
res = self._execute()
File "/usr/local/lib/python3.9/site-packages/ansible/executor/task_executor.py", line 647, in _execute
result = self._handler.run(task_vars=vars_copy)
File "/root/.ansible/collections/ansible_collections/f5networks/f5_modules/plugins/action/bigip.py", line 90, in run
out = conn.get_prompt()
File "/usr/local/lib/python3.9/site-packages/ansible/module_utils/connection.py", line 200, in __rpc__
raise ConnectionError(to_text(msg, errors='surrogate_then_replace'), code=code)
ansible.module_utils.connection.ConnectionError: ssh connection failed: ssh connect failed: Failed to resolve hostname inventory_hostname (Name or service not known)
The text was updated successfully, but these errors were encountered:
apellini
added
bug
Issues that are related to bugs in the Ansible modules
untriaged
issue that needs an initial response from the developers
labels
Jul 30, 2023
I tried with the following ansible playbook and I didn't get any error.
---
- name: Create a a new certificate
hosts: all
connection: local
collections:
- f5networks.f5_modules
- ansible.builtin
vars:
provider:
password: secret
server: 10.1.1.9
user: root
validate_certs: no
transport: cli
server_port: 22
tasks:
- name: Create a new certificate to replace expired certificate
bigip_device_certificate:
provider: "{{ provider }}"
days_valid: 365
force: yes
issuer:
country: US
state: WA
common_name: foobar.foo.local
delegate_to: localhost
Output:
PLAY [Create a VIP, pool and pool members] ***************************************************************************************TASK [Gathering Facts] ***********************************************************************************************************ok: [10.1.1.9]TASK [Create a new certificate to replace expired certificate] *******************************************************************[WARNING]: ansible-pylibssh not installed, falling back to paramikochanged: [10.1.1.9 -> localhost]PLAY RECAP ***********************************************************************************************************************10.1.1.9 : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
Did you follow this requirement?
"When using this module make sure SSH type is not set to libssh. To do this you could either set the environment variable like this ANSIBLE_NETWORK_CLI_SSH_TYPE=paramiko or set add ssh_type = paramiko under section persistent_connection in ansible.cfg."
pgouband
added
awaiting-user-action
issue awaiting user's response and/or requested action
and removed
bug
Issues that are related to bugs in the Ansible modules
untriaged
issue that needs an initial response from the developers
labels
Aug 10, 2023
COMPONENT NAME
bigip_device_certificate
Environment
ANSIBLE VERSION
BIGIP VERSION
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
With provider configure with transport cli, we receive an error of Name or service not known because it tries to connect to inventory_hostname instead of connect to its value.
STEPS TO REPRODUCE
EXPECTED RESULTS
Connect correctly to F5
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: