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:
Rohit 2019-08-23 20:23:50 +05:30 committed by GitHub
parent fa70690e5c
commit 11ba2a965d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 99 additions and 14 deletions

View file

@ -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:

View 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

View file

@ -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:

View file

@ -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 = """

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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
"""

View file

@ -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:

View file

@ -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:

View file

@ -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:

View file

@ -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: