platform guide updates (#61121)

* platform guide updates

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>

* sanity fix

Signed-off-by: rohitthakur2590 <rohitthakur2590@outlook.com>
pull/60686/head
Rohit 5 years ago committed by GitHub
parent fa70690e5c
commit 11ba2a965d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -29,6 +29,7 @@ Some Ansible Network platforms support multiple connection types, privilege esca
platform_routeros platform_routeros
platform_slxos platform_slxos
platform_voss platform_voss
platform_vyos
platform_netconf_enabled platform_netconf_enabled
.. _settings_by_platform: .. _settings_by_platform:

@ -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 devices running VyOS. It allows playbooks to add or remote
banner text from the active running configuration. banner text from the active running configuration.
notes: 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: options:
banner: banner:
description: description:

@ -81,11 +81,12 @@ options:
default: 1 default: 1
notes: 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 - 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. 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 - 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. 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 = """ EXAMPLES = """

@ -35,9 +35,8 @@ description:
in the device configuration. in the device configuration.
extends_documentation_fragment: vyos extends_documentation_fragment: vyos
notes: notes:
- Tested against VYOS 1.1.7 - Tested against VyOS 1.1.8 (helium).
- Abbreviated commands are NOT idempotent, see - This module works with connection C(network_cli). See L(the VyOS OS Platform Options,../network/user_guide/platform_vyos.html).
L(Network FAQ,../network/user_guide/faq.html#why-do-the-config-modules-always-return-changed-true-with-abbreviated-commands).
options: options:
lines: lines:
description: description:

@ -30,7 +30,8 @@ author:
- Rohit Thakur (@rohitthakur2590) - Rohit Thakur (@rohitthakur2590)
extends_documentation_fragment: vyos extends_documentation_fragment: vyos
notes: 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: options:
gather_subset: gather_subset:
description: description:

@ -44,6 +44,9 @@ description:
- This module manages the interface attributes on VyOS network devices. - This module manages the interface attributes on VyOS network devices.
- This module supports managing base attributes of Ethernet, Bonding, - This module supports managing base attributes of Ethernet, Bonding,
VXLAN, Loopback and Virtual Tunnel Interfaces. 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) author: Nilashish Chakraborty (@nilashishc)
options: options:
config: config:

@ -41,6 +41,9 @@ module: vyos_l3_interfaces
version_added: 2.9 version_added: 2.9
short_description: Manages L3 interface attributes of VyOS network devices. short_description: Manages L3 interface attributes of VyOS network devices.
description: This module manages the L3 interface attributes on 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) author: Nilashish Chakraborty (@NilashishC)
options: options:
config: 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. description: This module manages attributes of link aggregation groups on VyOS network devices.
notes: notes:
- Tested against VyOS 1.1.8 (helium). - 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) author: Rohit Thakur (@rohitthakur2590)
options: options:
config: 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. description: This module manages link layer discovery protocol (LLDP) attributes on VyOS devices.
notes: notes:
- Tested against VyOS 1.1.8 (helium). - 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: author:
- Rohit Thakur (@rohitthakur2590) - Rohit Thakur (@rohitthakur2590)
options: 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. description: This module manages attributes of lldp interfaces on VyOS network devices.
notes: notes:
- Tested against VyOS 1.1.8 (helium). - 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: author:
- Rohit Thakur (@rohitthakur2590) - Rohit Thakur (@rohitthakur2590)
options: options:

@ -33,7 +33,8 @@ description:
- This module provides declarative management of logging - This module provides declarative management of logging
on Vyatta Vyos devices. on Vyatta Vyos devices.
notes: 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: options:
dest: dest:
description: description:

@ -70,9 +70,11 @@ options:
choices: [ absent, present ] choices: [ absent, present ]
default: present default: present
notes: notes:
- Tested against VyOS 1.1.8 (helium).
- For a general purpose network module, see the M(net_ping) module. - For a general purpose network module, see the M(net_ping) module.
- For Windows targets, use the M(win_ping) module instead. - For Windows targets, use the M(win_ping) module instead.
- For targets running Python, use the M(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 extends_documentation_fragment: vyos
""" """

@ -34,7 +34,8 @@ description:
- This module provides declarative management of static - This module provides declarative management of static
IP routes on Vyatta VyOS network devices. IP routes on Vyatta VyOS network devices.
notes: 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: options:
prefix: prefix:
description: description:

@ -34,7 +34,8 @@ description:
returning successfully. returning successfully.
extends_documentation_fragment: vyos extends_documentation_fragment: vyos
notes: 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: options:
host_name: host_name:
description: description:

@ -36,7 +36,8 @@ description:
current running config. It also supports purging usernames from the current running config. It also supports purging usernames from the
configuration that are not explicitly defined. configuration that are not explicitly defined.
notes: 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: options:
aggregate: aggregate:
description: description:

@ -22,7 +22,8 @@ description:
- This module provides declarative management of VLANs - This module provides declarative management of VLANs
on VyOS network devices. on VyOS network devices.
notes: 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: options:
name: name:
description: description:

Loading…
Cancel
Save