platform guide updates (#61121)
* platform guide updates Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com> * sanity fix Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
This commit is contained in:
parent
fa70690e5c
commit
11ba2a965d
17 changed files with 99 additions and 14 deletions
|
@ -29,6 +29,7 @@ Some Ansible Network platforms support multiple connection types, privilege esca
|
|||
platform_routeros
|
||||
platform_slxos
|
||||
platform_voss
|
||||
platform_vyos
|
||||
platform_netconf_enabled
|
||||
|
||||
.. _settings_by_platform:
|
||||
|
|
69
docs/docsite/rst/network/user_guide/platform_vyos.rst
Normal file
69
docs/docsite/rst/network/user_guide/platform_vyos.rst
Normal file
|
@ -0,0 +1,69 @@
|
|||
.. _vyos_platform_options:
|
||||
|
||||
***************************************
|
||||
VyOS Platform Options
|
||||
***************************************
|
||||
|
||||
VyOS supports Enable Mode (Privilege Escalation). This page offers details on how to use Enable Mode on VyOS in Ansible.
|
||||
|
||||
.. contents:: Topics
|
||||
|
||||
Connections Available
|
||||
================================================================================
|
||||
|
||||
.. table::
|
||||
:class: documentation-table
|
||||
|
||||
==================== ==========================================
|
||||
.. CLI
|
||||
==================== ==========================================
|
||||
Protocol SSH
|
||||
|
||||
Credentials uses SSH keys / SSH-agent if present
|
||||
|
||||
accepts ``-u myuser -k`` if using password
|
||||
|
||||
Indirect Access via a bastion (jump host)
|
||||
|
||||
Connection Settings ``ansible_connection: network_cli``
|
||||
|
||||
|enable_mode| not supported
|
||||
|
||||
Returned Data Format Refer to individual module documentation
|
||||
==================== ==========================================
|
||||
|
||||
.. |enable_mode| replace:: Enable Mode |br| (Privilege Escalation)
|
||||
|
||||
|
||||
For legacy playbooks, VyOS still supports ``ansible_connection: local``. We recommend modernizing to use ``ansible_connection: network_cli`` as soon as possible.
|
||||
|
||||
Using CLI in Ansible
|
||||
====================
|
||||
|
||||
Example CLI ``group_vars/vyos.yml``
|
||||
-----------------------------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
ansible_connection: network_cli
|
||||
ansible_network_os: vyos
|
||||
ansible_user: myuser
|
||||
ansible_password: !vault...
|
||||
ansible_ssh_common_args: '-o ProxyCommand="ssh -W %h:%p -q bastion01"'
|
||||
|
||||
|
||||
- If you are using SSH keys (including an ssh-agent) you can remove the ``ansible_password`` configuration.
|
||||
- If you are accessing your host directly (not through a bastion/jump host) you can remove the ``ansible_ssh_common_args`` configuration.
|
||||
- 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 via environment variables.
|
||||
|
||||
Example CLI Task
|
||||
----------------
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
- name: Retrieve VyOS version info
|
||||
vyos_command:
|
||||
commands: show version
|
||||
when: ansible_network_os == 'vyos'
|
||||
|
||||
.. include:: shared_snippets/SSH_warning.txt
|
|
@ -34,7 +34,8 @@ description:
|
|||
devices running VyOS. It allows playbooks to add or remote
|
||||
banner text from the active running configuration.
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
banner:
|
||||
description:
|
||||
|
|
|
@ -81,11 +81,12 @@ options:
|
|||
default: 1
|
||||
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- Running C(show system boot-messages all) will cause the module to hang since
|
||||
VyOS is using a custom pager setting to display the output of that command.
|
||||
- If a command sent to the device requires answering a prompt, it is possible
|
||||
to pass a dict containing I(command), I(answer) and I(prompt). See examples.
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
"""
|
||||
|
||||
EXAMPLES = """
|
||||
|
|
|
@ -35,9 +35,8 @@ description:
|
|||
in the device configuration.
|
||||
extends_documentation_fragment: vyos
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Abbreviated commands are NOT idempotent, see
|
||||
L(Network FAQ,../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
lines:
|
||||
description:
|
||||
|
|
|
@ -30,7 +30,8 @@ author:
|
|||
- Rohit Thakur (@rohitthakur2590)
|
||||
extends_documentation_fragment: vyos
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
gather_subset:
|
||||
description:
|
||||
|
|
|
@ -44,6 +44,9 @@ description:
|
|||
- This module manages the interface attributes on VyOS network devices.
|
||||
- This module supports managing base attributes of Ethernet, Bonding,
|
||||
VXLAN, Loopback and Virtual Tunnel Interfaces.
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
author: Nilashish Chakraborty (@nilashishc)
|
||||
options:
|
||||
config:
|
||||
|
|
|
@ -41,6 +41,9 @@ module: vyos_l3_interfaces
|
|||
version_added: 2.9
|
||||
short_description: Manages L3 interface attributes of VyOS network devices.
|
||||
description: This module manages the L3 interface attributes on VyOS network devices.
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
author: Nilashish Chakraborty (@NilashishC)
|
||||
options:
|
||||
config:
|
||||
|
|
|
@ -43,7 +43,7 @@ short_description: Manages attributes of link aggregation groups on VyOS network
|
|||
description: This module manages attributes of link aggregation groups on VyOS network devices.
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
author: Rohit Thakur (@rohitthakur2590)
|
||||
options:
|
||||
config:
|
||||
|
|
|
@ -43,7 +43,7 @@ short_description: Manage link layer discovery protocol (LLDP) attributes on VyO
|
|||
description: This module manages link layer discovery protocol (LLDP) attributes on VyOS devices.
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
author:
|
||||
- Rohit Thakur (@rohitthakur2590)
|
||||
options:
|
||||
|
|
|
@ -43,7 +43,7 @@ short_description: Manages attributes of lldp interfaces on VyOS devices.
|
|||
description: This module manages attributes of lldp interfaces on VyOS network devices.
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli)
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
author:
|
||||
- Rohit Thakur (@rohitthakur2590)
|
||||
options:
|
||||
|
|
|
@ -33,7 +33,8 @@ description:
|
|||
- This module provides declarative management of logging
|
||||
on Vyatta Vyos devices.
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
dest:
|
||||
description:
|
||||
|
|
|
@ -70,9 +70,11 @@ options:
|
|||
choices: [ absent, present ]
|
||||
default: present
|
||||
notes:
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- For a general purpose network module, see the M(net_ping) module.
|
||||
- For Windows targets, use the M(win_ping) module instead.
|
||||
- For targets running Python, use the M(ping) module instead.
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
extends_documentation_fragment: vyos
|
||||
"""
|
||||
|
||||
|
|
|
@ -34,7 +34,8 @@ description:
|
|||
- This module provides declarative management of static
|
||||
IP routes on Vyatta VyOS network devices.
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
prefix:
|
||||
description:
|
||||
|
|
|
@ -34,7 +34,8 @@ description:
|
|||
returning successfully.
|
||||
extends_documentation_fragment: vyos
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
host_name:
|
||||
description:
|
||||
|
|
|
@ -36,7 +36,8 @@ description:
|
|||
current running config. It also supports purging usernames from the
|
||||
configuration that are not explicitly defined.
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
aggregate:
|
||||
description:
|
||||
|
|
|
@ -22,7 +22,8 @@ description:
|
|||
- This module provides declarative management of VLANs
|
||||
on VyOS network devices.
|
||||
notes:
|
||||
- Tested against VYOS 1.1.7
|
||||
- Tested against VyOS 1.1.8 (helium).
|
||||
- This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
|
||||
options:
|
||||
name:
|
||||
description:
|
||||
|
|
Loading…
Reference in a new issue