Skip to content

Commit 3464ee2

Browse files
authored
Update networking guides to be compatible with ansible-core 2.18+. (#2586)
The ansible.networking.network_cli connection plugin uses the ansible.netcommon.libssh connection plugin or falls back to ansible.builtin.paramiko. The ansible.builtin.paramiko connection no longer uses the variable 'ansible_ssh_common_args' to configure connecting via a jumphost, and now requires the variable 'ansible_paramiko_proxy_command'. This variable is also supported by ansible.netcommon.libssh >= 2.2.0 (in addition to ansible_libssh_proxy_command). Also fix example for ansible.netcommon.netconf, which never appears to have never supported 'ansible_ssh_common_args', but does support 'ansible_paramiko_proxy_command' and 'ansible_netconf_proxy_command'.
1 parent 071797b commit 3464ee2

24 files changed

+52
-52
lines changed

docs/docsite/rst/network/user_guide/network_debug_troubleshooting.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -658,19 +658,19 @@ file to specify the proxy host.
658658
nxos02
659659
660660
[nxos:vars]
661-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
661+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
662662
663663
664664
With the configuration above, simply build and run the playbook as normal with
665665
no additional changes necessary. The network module will now connect to the
666666
network device by first connecting to the host specified in
667-
``ansible_ssh_common_args``, which is ``bastion01`` in the above example.
667+
``ansible_paramiko_proxy_command``, which is ``bastion01`` in the above example.
668668

669669
You can also set the proxy target for all hosts by using environment variables.
670670

671671
.. code-block:: shell
672672
673-
export ANSIBLE_SSH_ARGS='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
673+
export ANSIBLE_PARAMIKO_PROXY_COMMAND='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
674674
675675
Using bastion/jump host with netconf connection
676676
-----------------------------------------------

docs/docsite/rst/network/user_guide/platform_ce.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ Example CLI inventory ``[ce:vars]``
5353
ansible_network_os=community.network.ce
5454
ansible_user=myuser
5555
ansible_password=!vault...
56-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
56+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5757

5858

5959
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
60-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
60+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6161
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords with environment variables.
6262

6363
Example CLI task
@@ -105,7 +105,7 @@ Example NETCONF inventory ``[ce:vars]``
105105
ansible_network_os=community.network.ce
106106
ansible_user=myuser
107107
ansible_password=!vault |
108-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
108+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
109109

110110

111111
Example NETCONF task

docs/docsite/rst/network/user_guide/platform_cnos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Example CLI ``group_vars/cnos.yml``
5454
ansible_become: true
5555
ansible_become_method: enable
5656
ansible_become_password: !vault...
57-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
57+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5858

5959

6060
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
61-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
61+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6262
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6363

6464
Example CLI task

docs/docsite/rst/network/user_guide/platform_dellos10.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ Example CLI ``group_vars/dellos10.yml``
5555
ansible_become: true
5656
ansible_become_method: enable
5757
ansible_become_password: !vault...
58-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
58+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5959

6060

6161
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
62-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
62+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6363
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6464

6565
Example CLI task

docs/docsite/rst/network/user_guide/platform_dellos6.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Example CLI ``group_vars/dellos6.yml``
5454
ansible_become: true
5555
ansible_become_method: enable
5656
ansible_become_password: !vault...
57-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
57+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5858

5959

6060
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
61-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
61+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6262
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6363

6464
Example CLI task

docs/docsite/rst/network/user_guide/platform_dellos9.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Example CLI ``group_vars/dellos9.yml``
5454
ansible_become: true
5555
ansible_become_method: enable
5656
ansible_become_password: !vault...
57-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
57+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5858

5959

6060
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
61-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
61+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6262
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6363

6464
Example CLI task

docs/docsite/rst/network/user_guide/platform_enos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Example CLI ``group_vars/enos.yml``
5656
ansible_become: true
5757
ansible_become_method: enable
5858
ansible_become_password: !vault...
59-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
59+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
6060

6161

6262
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
63-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
63+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6464
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6565

6666
Example CLI task

docs/docsite/rst/network/user_guide/platform_eos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ Example CLI ``group_vars/eos.yml``
5959
ansible_become: true
6060
ansible_become_method: enable
6161
ansible_become_password: !vault...
62-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
62+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
6363

6464

6565
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
66-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
66+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6767
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6868

6969
Example CLI task

docs/docsite/rst/network/user_guide/platform_eric_eccli.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ Example CLI ``group_vars/eric_eccli.yml``
4949
ansible_network_os: community.network.eric_eccli
5050
ansible_user: myuser
5151
ansible_password: !vault...
52-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
52+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5353

5454

5555
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
56-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
56+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
5757
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
5858

5959
Example CLI task

docs/docsite/rst/network/user_guide/platform_exos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ Example CLI ``group_vars/exos.yml``
5151
ansible_network_os: community.network.exos
5252
ansible_user: myuser
5353
ansible_password: !vault...
54-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
54+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5555

5656

5757
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
58-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
58+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
5959
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6060

6161
Example CLI task

docs/docsite/rst/network/user_guide/platform_frr.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ Example CLI ``group_vars/frr.yml``
4848
ansible_network_os: frr.frr.frr
4949
ansible_user: frruser
5050
ansible_password: !vault...
51-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
51+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5252

5353
- The ``ansible_user`` should be a part of the ``frrvty`` group and should have the default shell set to ``/bin/vtysh``.
5454
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
55-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
55+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
5656
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
5757

5858
Example CLI task

docs/docsite/rst/network/user_guide/platform_icx.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ Example CLI ``group_vars/icx.yml``
5252
ansible_become: true
5353
ansible_become_method: enable
5454
ansible_become_password: !vault...
55-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
55+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5656

5757

5858
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
59-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
59+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6060
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6161

6262
Example CLI task

docs/docsite/rst/network/user_guide/platform_ios.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ Example CLI ``group_vars/ios.yml``
5454
ansible_become: true
5555
ansible_become_method: enable
5656
ansible_become_password: !vault...
57-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
57+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5858

5959

6060
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
61-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
61+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6262
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6363

6464
Example CLI task

docs/docsite/rst/network/user_guide/platform_iosxr.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Example CLI inventory ``[iosxr:vars]``
5656
ansible_network_os=cisco.iosxr.iosxr
5757
ansible_user=myuser
5858
ansible_password=!vault...
59-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
59+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
6060

6161

6262
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
63-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
63+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6464
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6565

6666
Example CLI task
@@ -106,7 +106,7 @@ Example NETCONF inventory ``[iosxr:vars]``
106106
ansible_network_os=cisco.iosxr.iosxr
107107
ansible_user=myuser
108108
ansible_password=!vault |
109-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
109+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
110110

111111

112112
Example NETCONF task

docs/docsite/rst/network/user_guide/platform_ironware.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ Example CLI ``group_vars/mlx.yml``
5555
ansible_become: true
5656
ansible_become_method: enable
5757
ansible_become_password: !vault...
58-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
58+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5959

6060

6161
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
62-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
62+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6363
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6464

6565
Example CLI task

docs/docsite/rst/network/user_guide/platform_junos.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ Example CLI inventory ``[junos:vars]``
5757
ansible_network_os=junipernetworks.junos.junos
5858
ansible_user=myuser
5959
ansible_password=!vault...
60-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
60+
ansible_paramiko_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
6161

6262

6363
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
64-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
64+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6565
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6666

6767
Example CLI task
@@ -107,7 +107,7 @@ Example NETCONF inventory ``[junos:vars]``
107107
ansible_network_os=junipernetworks.junos.junos
108108
ansible_user=myuser
109109
ansible_password=!vault |
110-
ansible_ssh_common_args='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
110+
ansible_netconf_proxy_command='-o ProxyCommand="ssh -W %h:%p -q bastion01"'
111111

112112

113113
Example NETCONF task

docs/docsite/rst/network/user_guide/platform_netvisor.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ Example CLI ``group_vars/netvisor.yml``
5050
ansible_network_os: community.netcommon.netvisor
5151
ansible_user: myuser
5252
ansible_password: !vault...
53-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
53+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5454

5555

5656
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
57-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
57+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
5858
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
5959

6060
Example CLI task

docs/docsite/rst/network/user_guide/platform_nos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ Example CLI ``group_vars/nos.yml``
5050
ansible_network_os: community.network.nos
5151
ansible_user: myuser
5252
ansible_password: !vault...
53-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
53+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
5454

5555

5656
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
57-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
57+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
5858
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
5959

6060
Example CLI task

docs/docsite/rst/network/user_guide/platform_nxos.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Example CLI ``group_vars/nxos.yml``
5656
ansible_become: true
5757
ansible_become_method: enable
5858
ansible_become_password: !vault...
59-
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
59+
ansible_paramiko_proxy_command: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
6060

6161

6262
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
63-
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
63+
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_paramiko_proxy_command`` configuration.
6464
- If you are accessing your host through a bastion/jump host, you cannot include your SSH password in the ``ProxyCommand`` directive. To prevent secrets from leaking out (for example in ``ps`` output), SSH does not support providing passwords through environment variables.
6565

6666
Example CLI task

0 commit comments

Comments
 (0)