Open rh-iwalker opened 10 months ago
Hi,
Thanks for reporting. Added to the backlog and internal tracking ID for this request is: INFRAANO-1377.
Hi @pgouband Could you share if this bug is considered for a fix and when the fix will be available. Thank you.
Hi @jbollineni,
This bug is in our backlog but it's not a priority. I don't have ETA.
Hi,
This issue is under development.
Hello, I have raised an issue on ansible.netcommon, once that issue is fixed then I'll be able to make changes on our side to fix this issue.
Issue raised on ansible.netcommon: https://github.com/ansible-collections/ansible.netcommon/issues/641
@pgouband I am documenting what we have been checking via mail, it's my understanding that the issue is driven due to the connection plugin used, and the playbooks are working well, when using network_cli. As this should be the definitive fix. Are we good recommending the use of network_cli for all big_ip playbooks?
Hi, for ansible-core version >= 2.15.0 it's recommended to use network_cli plugin as follows:
---
- name: Test
hosts: f5test
gather_facts: false
connection: network_cli
vars:
ansible_network_os: bigip
ansible_user: user
ansible_password: passwd
provider:
server: "1.2.3.4"
user: user
password: passwd
validate_certs: no
server_port: 22
transport: cli
tasks:
- name: test
f5networks.f5_modules.bigip_command:
commands:
- show sys version
provider: "{{ provider }}"
COMPONENT NAME
bigip_command
Environment
ANSIBLE VERSION
BIGIP VERSION
N/A
CONFIGURATION
N/A
OS / ENVIRONMENT
Collections:
SUMMARY
As of Ansible Core 2.15, the BIG-IP modules seem to try to connect to
inventory_hostname
, instead of what is defined inprovider
.Running
bigip_command
with Ansible 2.15 and thecli
transport results in aName or service not known
error when run with paramiko. With libssh,ssh connection failed: ssh connect failed: Failed to resolve hostname inventory_hostname (Name or service not known)
error occurs.Running the same playbook with Ansible 2.14 works OK.
Seems to be related to #2348 (Ansible 2.13 with libssh), which suggested setting
$ANSIBLE_NETWORK_CLI_SSH_TYPE=paramiko
, but that does not seem to work anymore.The issue seems to be caused by paramiko connection now uses the correct source of data, a change to Ansible 2.15 which makes the paramiko connection plugin behave more like the libssh plugin.
STEPS TO REPRODUCE
Playbook:
Run playbook with
ansible-playbook -i localhost, -vvvvv playbook.yaml
.EXPECTED RESULTS
Ansible connects to the host defined in
provider
and runs the commands.ACTUAL RESULTS
Ansible tries to connect to
inventory_hostname
which results in the following error when run with paramiko:You get the following error when run with libssh: