From 9c1033422b53b7308f2ec7229222c8e7740f4566 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 15 Feb 2019 10:52:48 +0100 Subject: [PATCH] doc_fragments: Clean up parameter types (network) (#52176) * module_utils: Clean up parameter types This PR includes: - Parameter types added - Copyright format fixes - Short license statement - Description fixes (only for a few files, then I stopped :-)) * More network stuff * Fix typo * Fix PEP8 * Fix booleans * Fix typo --- lib/ansible/plugins/doc_fragments/a10.py | 37 ++++------ lib/ansible/plugins/doc_fragments/aireos.py | 68 ++++++++----------- lib/ansible/plugins/doc_fragments/aruba.py | 31 ++++----- lib/ansible/plugins/doc_fragments/asa.py | 39 +++++------ lib/ansible/plugins/doc_fragments/avi.py | 35 ++++------ lib/ansible/plugins/doc_fragments/cnos.py | 57 ++++++++-------- lib/ansible/plugins/doc_fragments/dellos10.py | 11 ++- lib/ansible/plugins/doc_fragments/dellos6.py | 7 +- lib/ansible/plugins/doc_fragments/dellos9.py | 6 +- lib/ansible/plugins/doc_fragments/enos.py | 30 ++++---- lib/ansible/plugins/doc_fragments/eos.py | 49 ++++++------- lib/ansible/plugins/doc_fragments/f5.py | 50 +++++++------- lib/ansible/plugins/doc_fragments/fortios.py | 38 +++++------ lib/ansible/plugins/doc_fragments/ingate.py | 40 +++++------ lib/ansible/plugins/doc_fragments/ios.py | 38 +++++------ lib/ansible/plugins/doc_fragments/iosxr.py | 36 ++++------ lib/ansible/plugins/doc_fragments/ironware.py | 37 +++++----- lib/ansible/plugins/doc_fragments/junos.py | 32 ++++----- lib/ansible/plugins/doc_fragments/meraki.py | 6 +- lib/ansible/plugins/doc_fragments/mso.py | 2 +- lib/ansible/plugins/doc_fragments/netconf.py | 34 ++++------ .../plugins/doc_fragments/netscaler.py | 28 +++++--- .../plugins/doc_fragments/network_agnostic.py | 22 ++---- lib/ansible/plugins/doc_fragments/nios.py | 37 +++++----- lib/ansible/plugins/doc_fragments/nso.py | 25 ++----- lib/ansible/plugins/doc_fragments/nxos.py | 6 +- lib/ansible/plugins/doc_fragments/onyx.py | 32 ++++----- .../plugins/doc_fragments/openswitch.py | 41 +++++------ lib/ansible/plugins/doc_fragments/panos.py | 8 ++- lib/ansible/plugins/doc_fragments/sros.py | 32 ++++----- lib/ansible/plugins/doc_fragments/vyos.py | 32 ++++----- 31 files changed, 411 insertions(+), 535 deletions(-) diff --git a/lib/ansible/plugins/doc_fragments/a10.py b/lib/ansible/plugins/doc_fragments/a10.py index 088f3e95da..10aa23bb46 100644 --- a/lib/ansible/plugins/doc_fragments/a10.py +++ b/lib/ansible/plugins/doc_fragments/a10.py @@ -1,28 +1,13 @@ -# -# (c) 2016, John Barker -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2016, John Barker +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ -notes: - - "Requires A10 Networks aXAPI 2.1" + DOCUMENTATION = r''' options: host: description: @@ -49,12 +34,14 @@ options: so care should be taken when specifying C(yes). type: bool default: no - version_added: 2.2 + version_added: '2.2' validate_certs: description: - - If C(no), SSL certificates will not be validated. This should only be used - on personally controlled devices using self-signed certificates. + - If C(no), SSL certificates will not be validated. + - This should only be used on personally controlled devices using self-signed certificates. type: bool default: yes - version_added: 2.2 -""" + version_added: '2.2' +notes: + - Requires A10 Networks aXAPI 2.1. +''' diff --git a/lib/ansible/plugins/doc_fragments/aireos.py b/lib/ansible/plugins/doc_fragments/aireos.py index 6f623a3a0c..b3e734a06c 100644 --- a/lib/ansible/plugins/doc_fragments/aireos.py +++ b/lib/ansible/plugins/doc_fragments/aireos.py @@ -1,26 +1,13 @@ -# -# (c) 2017, James Mighion <@jmighion> -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, James Mighion <@jmighion> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -28,38 +15,41 @@ options: suboptions: host: description: - - Specifies the DNS host name or address for connecting to the remote - device over the specified transport. The value of host is used as - the destination address for the transport. + - Specifies the DNS host name or address for connecting to the remote device over the specified transport. + - The value of host is used as the destination address for the transport. + type: str required: true port: description: - - Specifies the port to use when building the connection to the remote. - device. + - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: - - Configures the username to use to authenticate the connection to - the remote device. This value is used to authenticate - the SSH session. If the value is not specified in the task, the - value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + - Configures the username to use to authenticate the connection to the remote device. + - This value is used to authenticate the SSH session. + - If the value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - - Specifies the password to use to authenticate the connection to - the remote device. This value is used to authenticate - the SSH session. If the value is not specified in the task, the - value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + - Specifies the password to use to authenticate the connection to the remote device. + - This value is used to authenticate the SSH session. + - If the value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device - for either connecting or sending commands. If the timeout is - exceeded before the operation is completed, the module will error. + for either connecting or sending commands. + - If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: - - Specifies the SSH key to use to authenticate the connection to - the remote device. This value is the path to the - key used to authenticate the SSH session. If the value is not specified - in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) - will be used instead. -""" + - Specifies the SSH key to use to authenticate the connection to the remote device. + - This value is the path to the key used to authenticate the SSH session. + - If the value is not specified in the task, the value of environment variable + C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path +''' diff --git a/lib/ansible/plugins/doc_fragments/aruba.py b/lib/ansible/plugins/doc_fragments/aruba.py index 6f623a3a0c..6bd49ddf9f 100644 --- a/lib/ansible/plugins/doc_fragments/aruba.py +++ b/lib/ansible/plugins/doc_fragments/aruba.py @@ -1,26 +1,13 @@ -# -# (c) 2017, James Mighion <@jmighion> -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, James Mighion <@jmighion> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -31,11 +18,13 @@ options: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote. device. + type: int default: 22 username: description: @@ -43,17 +32,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -62,4 +54,5 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. -""" + type: path +''' diff --git a/lib/ansible/plugins/doc_fragments/asa.py b/lib/ansible/plugins/doc_fragments/asa.py index 183ba3b693..7bbe00f74e 100644 --- a/lib/ansible/plugins/doc_fragments/asa.py +++ b/lib/ansible/plugins/doc_fragments/asa.py @@ -1,27 +1,14 @@ -# -# (c) 2016, Peter Sprygada -# (c) 2016, Patrick Ogenstad <@ogenstad> -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2016, Peter Sprygada +# Copyright: (c) 2016, Patrick Ogenstad <@ogenstad> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: authorize: description: @@ -35,11 +22,12 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no context: description: - Specifies which context to target if you are running in the ASA in multiple context mode. Defaults to the current context you login to. + type: str provider: description: - B(Deprecated) @@ -53,10 +41,12 @@ options: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: host port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -64,12 +54,14 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str ssh_keyfile: description: - Specifies the SSH key to use to authenticate the connection to @@ -77,6 +69,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -85,19 +78,21 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str timeout: description: - Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations. + type: int default: 10 notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/avi.py b/lib/ansible/plugins/doc_fragments/avi.py index 5e034fe540..098e2cef10 100644 --- a/lib/ansible/plugins/doc_fragments/avi.py +++ b/lib/ansible/plugins/doc_fragments/avi.py @@ -1,63 +1,56 @@ -# +# -*- coding: utf-8 -*- + # Created on December 12, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Avi Version: 16.3.4 -# -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Avi common documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: controller: description: - IP address or hostname of the controller. The default value is the environment variable C(AVI_CONTROLLER). + type: str default: '' username: description: - Username used for accessing Avi controller. The default value is the environment variable C(AVI_USERNAME). + type: str default: '' password: description: - Password of Avi user in Avi controller. The default value is the environment variable C(AVI_PASSWORD). + type: str default: '' tenant: description: - Name of tenant used for all Avi API calls and context of object. + type: str default: admin tenant_uuid: description: - UUID of tenant used for all Avi API calls and context of object. + type: str default: '' api_version: description: - Avi API version of to use for Avi API and objects. - default: "16.4.4" + type: str + default: 16.4.4 avi_credentials: description: - Avi Credentials dictionary which can be used in lieu of enumerating Avi Controller login details. + type: str version_added: "2.5" api_context: description: - Avi API context that includes current session ID and CSRF Token. - This allows user to perform single login and re-use the session. + type: str version_added: "2.5" notes: - For more information on using Ansible to manage Avi Network devices see U(https://www.ansible.com/ansible-avi-networks). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/cnos.py b/lib/ansible/plugins/doc_fragments/cnos.py index 3f41a2c564..184315432b 100644 --- a/lib/ansible/plugins/doc_fragments/cnos.py +++ b/lib/ansible/plugins/doc_fragments/cnos.py @@ -1,25 +1,12 @@ -# Copyright (C) 2017 Lenovo, Inc. -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, Lenovo, Inc. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard CNOS documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: outputfile: description: @@ -28,8 +15,9 @@ options: template file and each response from the device are saved here. Usually the location is the results folder, but you can choose another location based on your write permission. + type: path required: true - version_added: 2.3 + version_added: '2.3' host: description: - This is the variable used to search the hosts file at @@ -38,8 +26,9 @@ options: keyword {{ inventory_hostname }} is specified in the playbook as an abstraction of the group of network elements that need to be configured. + type: str required: true - version_added: 2.3 + version_added: '2.3' username: description: - Configures the username used to authenticate the connection to @@ -48,8 +37,9 @@ options: come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. + type: str required: true - version_added: 2.3 + version_added: '2.3' password: description: - Configures the password used to authenticate the connection to @@ -58,8 +48,9 @@ options: come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. + type: str required: true - version_added: 2.3 + version_added: '2.3' enablePassword: description: - Configures the password used to enter Global Configuration @@ -68,16 +59,26 @@ options: should come from the inventory file, you can also specify it as a variable. This parameter is optional. If it is not specified, no default value will be used. - version_added: 2.3 + type: str + version_added: '2.3' deviceType: description: - This specifies the type of device where the method is executed. The choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added - since version 2.4. The choice NE0152T is added since 2.8 - required: Yes - choices: [g8272_cnos,g8296_cnos,g8332_cnos,NE1072T,NE1032, - NE1032T,NE10032,NE2572,NE0152T] - version_added: 2.3 + since Ansible 2.4. The choice NE0152T is added since 2.8 + type: str + required: true + choices: + - g8272_cnos + - g8296_cnos + - g8332_cnos + - NE0152T + - NE1072T + - NE1032 + - NE1032T + - NE10032 + - NE2572 + version_added: '2.3' notes: - For more information on using Ansible to manage Lenovo Network devices see U(https://www.ansible.com/ansible-lenovo). ''' diff --git a/lib/ansible/plugins/doc_fragments/dellos10.py b/lib/ansible/plugins/doc_fragments/dellos10.py index 71c70cec48..e65e53cdc3 100644 --- a/lib/ansible/plugins/doc_fragments/dellos10.py +++ b/lib/ansible/plugins/doc_fragments/dellos10.py @@ -8,44 +8,51 @@ class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: - User to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Password to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str ssh_keyfile: description: - Path to an ssh key used to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path timeout: description: - Specifies idle timeout (in seconds) for the connection. Useful if the console freezes before continuing. For example when saving configurations. + type: int default: 10 notes: - For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/dellos6.py b/lib/ansible/plugins/doc_fragments/dellos6.py index 61fe4b2dfe..e65e53cdc3 100644 --- a/lib/ansible/plugins/doc_fragments/dellos6.py +++ b/lib/ansible/plugins/doc_fragments/dellos6.py @@ -8,11 +8,12 @@ class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: @@ -44,7 +45,7 @@ options: - Path to an ssh key used to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. - type: str + type: path timeout: description: - Specifies idle timeout (in seconds) for the connection. Useful if the @@ -54,4 +55,4 @@ options: default: 10 notes: - For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/dellos9.py b/lib/ansible/plugins/doc_fragments/dellos9.py index 4afb580411..e65e53cdc3 100644 --- a/lib/ansible/plugins/doc_fragments/dellos9.py +++ b/lib/ansible/plugins/doc_fragments/dellos9.py @@ -8,7 +8,7 @@ class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -45,7 +45,7 @@ options: - Path to an ssh key used to authenticate the SSH session to the remote device. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. - type: str + type: path timeout: description: - Specifies idle timeout (in seconds) for the connection. Useful if the @@ -55,4 +55,4 @@ options: default: 10 notes: - For more information on using Ansible to manage Dell EMC Network devices see U(https://www.ansible.com/ansible-dell-networking). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/enos.py b/lib/ansible/plugins/doc_fragments/enos.py index 128608f28e..7b26c9056d 100644 --- a/lib/ansible/plugins/doc_fragments/enos.py +++ b/lib/ansible/plugins/doc_fragments/enos.py @@ -1,20 +1,14 @@ -# (C) 2017 Red Hat Inc. -# Copyright (C) 2017 Lenovo. -# -# GNU General Public License v3.0+ -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, Red Hat Inc. +# Copyright: (c) 2017, Lenovo. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: authorize: description: @@ -24,7 +18,7 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode @@ -34,16 +28,19 @@ options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -51,17 +48,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -70,6 +70,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -78,11 +79,12 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str ''' diff --git a/lib/ansible/plugins/doc_fragments/eos.py b/lib/ansible/plugins/doc_fragments/eos.py index 0252d1dcd8..73435ae66a 100644 --- a/lib/ansible/plugins/doc_fragments/eos.py +++ b/lib/ansible/plugins/doc_fragments/eos.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: authorize: description: @@ -35,7 +22,7 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - B(Deprecated) @@ -47,6 +34,7 @@ options: on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str provider: description: - B(Deprecated) @@ -55,12 +43,14 @@ options: - For more information please see the L(EOS Platform Options guide, ../network/user_guide/platform_eos.html). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: @@ -68,6 +58,7 @@ options: device. This value applies to either I(cli) or I(eapi). The port value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443). + type: int default: 0 (use common port) username: description: @@ -76,17 +67,20 @@ options: either the CLI login or the eAPI authentication depending on which transport is used. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This is a common argument used for either I(cli) or I(eapi) transports. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -94,6 +88,7 @@ options: the remote device. This argument is only used for I(cli) transports. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -102,29 +97,29 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str transport: description: - Configures the transport connection to use when connecting to the remote device. required: true - choices: - - eapi - - cli + type: str + choices: [ cli, eapi ] default: cli use_ssl: description: - - Configures the I(transport) to use SSL if set to true only when the + - Configures the I(transport) to use SSL if set to C(yes) only when the C(transport=eapi). If the transport argument is not eapi, this value is ignored. type: bool - default: 'yes' + default: yes validate_certs: description: - If C(no), SSL certificates will not be validated. This should only be used @@ -135,7 +130,7 @@ options: description: - If C(no), the environment variables C(http_proxy) and C(https_proxy) will be ignored. type: bool - default: 'yes' + default: yes version_added: "2.5" notes: @@ -143,4 +138,4 @@ notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Arista EOS devices see the `Arista integration page `_. -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/f5.py b/lib/ansible/plugins/doc_fragments/f5.py index 798bd9ced6..1b4b661f14 100644 --- a/lib/ansible/plugins/doc_fragments/f5.py +++ b/lib/ansible/plugins/doc_fragments/f5.py @@ -1,47 +1,38 @@ # -*- coding: utf-8 -*- -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard F5 documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: password: description: - The password for the user account used to connect to the BIG-IP. - You may omit this option by setting the environment variable C(F5_PASSWORD). + type: str required: true - aliases: ['pass', 'pwd'] + aliases: [ pass, pwd ] server: description: - The BIG-IP host. - You may omit this option by setting the environment variable C(F5_SERVER). + type: str required: true server_port: description: - The BIG-IP server port. - You may omit this option by setting the environment variable C(F5_SERVER_PORT). + type: int default: 443 - version_added: 2.2 + version_added: '2.2' user: description: - The username to connect to the BIG-IP with. This user must have administrative privileges on the device. - You may omit this option by setting the environment variable C(F5_USER). + type: str required: true validate_certs: description: @@ -49,62 +40,67 @@ options: on personally controlled sites using self-signed certificates. - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS). - default: yes type: bool - version_added: 2.0 + default: yes + version_added: '2.0' provider: description: - A dict object containing connection details. - default: null - version_added: 2.5 + type: dict + version_added: '2.5' suboptions: password: description: - The password for the user account used to connect to the BIG-IP. - You may omit this option by setting the environment variable C(F5_PASSWORD). + type: str required: true - aliases: ['pass', 'pwd'] + aliases: [ pass, pwd ] server: description: - The BIG-IP host. - You may omit this option by setting the environment variable C(F5_SERVER). + type: str required: true server_port: description: - The BIG-IP server port. - You may omit this option by setting the environment variable C(F5_SERVER_PORT). + type: int default: 443 user: description: - The username to connect to the BIG-IP with. This user must have administrative privileges on the device. - You may omit this option by setting the environment variable C(F5_USER). + type: str required: true validate_certs: description: - If C(no), SSL certificates are not validated. Use this only on personally controlled sites using self-signed certificates. - You may omit this option by setting the environment variable C(F5_VALIDATE_CERTS). - default: yes type: bool + default: yes timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: - Specifies the SSH keyfile to use to authenticate the connection to the remote device. This argument is only used for I(cli) transports. - You may omit this option by setting the environment variable C(ANSIBLE_NET_SSH_KEYFILE). + type: path transport: description: - Configures the transport connection to use when connecting to the remote device. - choices: - - rest - - cli + type: str + choices: [ cli, rest ] default: rest notes: - For more information on using Ansible to manage F5 Networks devices see U(https://www.ansible.com/integrations/networks/f5). diff --git a/lib/ansible/plugins/doc_fragments/fortios.py b/lib/ansible/plugins/doc_fragments/fortios.py index d53bbc007a..01c71546f5 100644 --- a/lib/ansible/plugins/doc_fragments/fortios.py +++ b/lib/ansible/plugins/doc_fragments/fortios.py @@ -1,67 +1,61 @@ -# -# (c) 2017, Benjamin Jolivot -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, Benjamin Jolivot +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: file_mode: description: - Don't connect to any device, only use I(config_file) as input and Output. - default: false type: bool + default: no version_added: "2.4" config_file: description: - Path to configuration file. Required when I(file_mode) is True. + type: path version_added: "2.4" host: description: - Specifies the DNS hostname or IP address for connecting to the remote fortios device. Required when I(file_mode) is False. + type: str username: description: - Configures the username used to authenticate to the remote device. Required when I(file_mode) is True. + type: str password: description: - Specifies the password used to authenticate to the remote device. Required when I(file_mode) is True. + type: str timeout: description: - Timeout in seconds for connecting to the remote device. + type: int default: 60 vdom: description: - Specifies on which vdom to apply configuration + type: str backup: description: - This argument will cause the module to create a backup of the current C(running-config) from the remote device before any changes are made. The backup file is written to the i(backup) folder. - default: no type: bool + default: no backup_path: description: - Specifies where to store backup files. Required if I(backup=yes). + type: path backup_filename: description: - Specifies the backup filename. If omitted filename will be formatted like HOST_config.YYYY-MM-DD@HH:MM:SS -""" + type: str +''' diff --git a/lib/ansible/plugins/doc_fragments/ingate.py b/lib/ansible/plugins/doc_fragments/ingate.py index 1b07d2dd5f..0887f7dcbe 100644 --- a/lib/ansible/plugins/doc_fragments/ingate.py +++ b/lib/ansible/plugins/doc_fragments/ingate.py @@ -1,23 +1,11 @@ -# Copyright (c) 2018, Ingate Systems AB -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2018, Ingate Systems AB +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: client: description: @@ -26,39 +14,43 @@ options: version: description: - REST API version. - choices: [v1] + type: str + choices: [ v1 ] default: v1 - required: true scheme: description: - Which HTTP protocol to use. - choices: [http, https] + type: str required: true + choices: [ http, https ] address: description: - The hostname or IP address to the unit. + type: str required: true username: description: - The username of the REST API user. + type: str required: true password: description: - The password for the REST API user. + type: str required: true port: description: - Which HTTP(S) port to connect to. - required: false + type: int timeout: description: - The timeout (in seconds) for REST API requests. - required: false + type: int verify_ssl: description: - Verify the unit's HTTPS certificate. - default: true - required: false + type: bool + default: yes notes: - This module requires that the Ingate Python SDK is installed on the host. To install the SDK use the pip command from your shell diff --git a/lib/ansible/plugins/doc_fragments/ios.py b/lib/ansible/plugins/doc_fragments/ios.py index b53aa31655..8a75dee3fa 100644 --- a/lib/ansible/plugins/doc_fragments/ios.py +++ b/lib/ansible/plugins/doc_fragments/ios.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: authorize: description: @@ -34,7 +21,7 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - B(Deprecated) @@ -45,6 +32,7 @@ options: on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str provider: description: - B(Deprecated) @@ -52,16 +40,19 @@ options: - For more information please see the L(IOS Platform Options guide, ../network/user_guide/platform_ios.html). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -69,17 +60,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -88,6 +82,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -96,14 +91,15 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Cisco devices see the `Cisco integration page `_. -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/iosxr.py b/lib/ansible/plugins/doc_fragments/iosxr.py index c54046b2af..1457169b09 100644 --- a/lib/ansible/plugins/doc_fragments/iosxr.py +++ b/lib/ansible/plugins/doc_fragments/iosxr.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -29,16 +16,19 @@ options: - For more information please see the L(Network Guide, ../network/getting_started/network_differences.html#multiple-communication-protocols). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -46,17 +36,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -65,10 +58,11 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path requirements: - - "ncclient >= 0.5.3 when using netconf" - - "lxml >= 4.1.1 when using netconf" + - ncclient >= 0.5.3 when using netconf + - lxml >= 4.1.1 when using netconf notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Cisco devices see the `Cisco integration page `_. -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/ironware.py b/lib/ansible/plugins/doc_fragments/ironware.py index 7a57478e7d..afdc431038 100644 --- a/lib/ansible/plugins/doc_fragments/ironware.py +++ b/lib/ansible/plugins/doc_fragments/ironware.py @@ -1,26 +1,13 @@ -# -# (c) 2017, Paul Baker <@paulquack> -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2017, Paul Baker <@paulquack> +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: authorize: description: @@ -34,7 +21,7 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no provider: description: - B(Deprecated) @@ -42,16 +29,19 @@ options: - For more information please see the L(IronWare Platform Options guide, ../network/user_guide/platform_ironware.html). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -59,12 +49,14 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str ssh_keyfile: description: - Specifies the SSH key to use to authenticate the connection to @@ -72,6 +64,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -80,19 +73,21 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. + type: str timeout: description: - Specifies idle timeout in seconds for the connection, in seconds. Useful if the console freezes before continuing. For example when saving configurations. + type: int default: 10 notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/junos.py b/lib/ansible/plugins/doc_fragments/junos.py index d8596862b5..d2bc120db1 100644 --- a/lib/ansible/plugins/doc_fragments/junos.py +++ b/lib/ansible/plugins/doc_fragments/junos.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -29,12 +16,14 @@ options: - For more information please see the L(Junos OS Platform Options guide, ../network/user_guide/platform_junos.html). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: @@ -42,6 +31,7 @@ options: device. The port value will default to the well known SSH port of 22 (for C(transport=cli)) or port 830 (for C(transport=netconf)) device. + type: int default: 22 username: description: @@ -49,17 +39,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -68,8 +61,9 @@ options: used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path notes: - For information on using CLI and netconf see the :ref:`Junos OS Platform Options guide ` - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Juniper network devices see U(https://www.ansible.com/ansible-juniper). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/meraki.py b/lib/ansible/plugins/doc_fragments/meraki.py index ea4ea44339..2b666331e9 100644 --- a/lib/ansible/plugins/doc_fragments/meraki.py +++ b/lib/ansible/plugins/doc_fragments/meraki.py @@ -30,12 +30,12 @@ options: - If C(no), it will use HTTP. Otherwise it will use HTTPS. - Only useful for internal Meraki developers. type: bool - default: 'yes' + default: yes output_level: description: - Set amount of debug output during module execution type: str - choices: [ normal, debug ] + choices: [ debug, normal ] default: normal timeout: description: @@ -46,7 +46,7 @@ options: description: - Whether to validate HTTP certificates. type: bool - default: 'yes' + default: yes org_name: description: - Name of organization. diff --git a/lib/ansible/plugins/doc_fragments/mso.py b/lib/ansible/plugins/doc_fragments/mso.py index 8add92c8c5..d036f9f540 100644 --- a/lib/ansible/plugins/doc_fragments/mso.py +++ b/lib/ansible/plugins/doc_fragments/mso.py @@ -6,7 +6,7 @@ class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: host: description: diff --git a/lib/ansible/plugins/doc_fragments/netconf.py b/lib/ansible/plugins/doc_fragments/netconf.py index b578fc31b4..f2b90201e4 100644 --- a/lib/ansible/plugins/doc_fragments/netconf.py +++ b/lib/ansible/plugins/doc_fragments/netconf.py @@ -1,31 +1,19 @@ -# -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: @@ -39,12 +27,14 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device @@ -62,16 +52,16 @@ options: type: path hostkey_verify: description: - - If set to true, the ssh host key of the device must match a ssh key present on - the host if false, the ssh host key of the device is not checked. + - If set to C(yes), the ssh host key of the device must match a ssh key present on + the host if set to C(no), the ssh host key of the device is not checked. type: bool - default: True + default: yes look_for_keys: description: - Enables looking in the usual locations for the ssh keys (e.g. :file:`~/.ssh/id_*`) type: bool - default: True + default: yes notes: - For information on using netconf see the :ref:`Platform Options guide using Netconf` - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/netscaler.py b/lib/ansible/plugins/doc_fragments/netscaler.py index 3f47b2c32e..bf36d84d3b 100644 --- a/lib/ansible/plugins/doc_fragments/netscaler.py +++ b/lib/ansible/plugins/doc_fragments/netscaler.py @@ -1,55 +1,65 @@ +# -*- coding: utf-8 -*- + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) + + class ModuleDocFragment(object): - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: nsip: description: - The ip address of the netscaler appliance where the nitro API calls will be made. - "The port can be specified with the colon (:). E.g. 192.168.1.1:555." + type: str required: True nitro_user: description: - The username with which to authenticate to the netscaler node. + type: str required: True nitro_pass: description: - The password with which to authenticate to the netscaler node. + type: str required: True nitro_protocol: - choices: [ 'http', 'https' ] - default: http description: - Which protocol to use when accessing the nitro API objects. + type: str + choices: [ http, https ] + default: http validate_certs: description: - If C(no), SSL certificates will not be validated. This should only be used on personally controlled sites using self-signed certificates. - required: false - default: 'yes' type: bool + default: yes nitro_timeout: description: - Time in seconds until a timeout error is thrown when establishing a new session with Netscaler + type: int default: 310 state: - choices: ['present', 'absent'] - default: 'present' description: - The state of the resource being configured by the module on the netscaler node. - When present the resource will be created if needed and configured according to the module's parameters. - When absent the resource will be deleted from the netscaler node. + type: str + choices: [ absent, present ] + default: present save_config: description: - - If true the module will save the configuration on the netscaler node if it makes any changes. + - If C(yes) the module will save the configuration on the netscaler node if it makes any changes. - The module will not save the configuration on the netscaler node if it made no changes. type: bool - default: true + default: yes notes: - For more information on using Ansible to manage Citrix NetScaler Network devices see U(https://www.ansible.com/ansible-netscaler). ''' diff --git a/lib/ansible/plugins/doc_fragments/network_agnostic.py b/lib/ansible/plugins/doc_fragments/network_agnostic.py index d76e18555a..043aceb8e0 100644 --- a/lib/ansible/plugins/doc_fragments/network_agnostic.py +++ b/lib/ansible/plugins/doc_fragments/network_agnostic.py @@ -1,25 +1,13 @@ -# Copyright (c) 2019 Ansible, Inc -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2019 Ansible, Inc +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: {} notes: - This module is supported on C(ansible_network_os) network platforms. See diff --git a/lib/ansible/plugins/doc_fragments/nios.py b/lib/ansible/plugins/doc_fragments/nios.py index b05de60c1d..7867d5a5d9 100644 --- a/lib/ansible/plugins/doc_fragments/nios.py +++ b/lib/ansible/plugins/doc_fragments/nios.py @@ -1,30 +1,18 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: @@ -32,6 +20,7 @@ options: instance of NIOS WAPI over REST - Value can also be specified using C(INFOBLOX_HOST) environment variable. + type: str required: true username: description: @@ -39,24 +28,27 @@ options: the remote instance of NIOS. - Value can also be specified using C(INFOBLOX_USERNAME) environment variable. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote instance of NIOS. - Value can also be specified using C(INFOBLOX_PASSWORD) environment variable. + type: str ssl_verify: description: - Boolean value to enable or disable verifying SSL certificates - Value can also be specified using C(INFOBLOX_SSL_VERIFY) environment variable. type: bool - default: 'no' + default: no http_request_timeout: description: - The amount of time before to wait before receiving a response - Value can also be specified using C(INFOBLOX_HTTP_REQUEST_TIMEOUT) environment variable. + type: int default: 10 max_retries: description: @@ -64,6 +56,7 @@ options: is declared usable - Value can also be specified using C(INFOBLOX_MAX_RETRIES) environment variable. + type: int default: 3 wapi_version: description: @@ -71,7 +64,8 @@ options: - Value can also be specified using C(INFOBLOX_WAP_VERSION) environment variable. - Until ansible 2.8 the default WAPI was 1.4 - default: 2.1 + type: str + default: '2.1' max_results: description: - Specifies the maximum number of objects to be returned, @@ -79,9 +73,10 @@ options: number of returned objects would exceed the setting. - Value can also be specified using C(INFOBLOX_MAX_RESULTS) environment variable. + type: int default: 1000 notes: - "This module must be run locally, which can be achieved by specifying C(connection: local)." - Please read the :ref:`nios_guide` for more detailed information on how to use Infoblox with Ansible. -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/nso.py b/lib/ansible/plugins/doc_fragments/nso.py index aaa16a7468..49a3b08e98 100644 --- a/lib/ansible/plugins/doc_fragments/nso.py +++ b/lib/ansible/plugins/doc_fragments/nso.py @@ -1,39 +1,28 @@ # -*- coding: utf-8 -*- -# Copyright (c) 2017 Cisco and/or its affiliates. -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . -# +# Copyright: (c) 2017, Cisco and/or its affiliates. +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: url: description: NSO JSON-RPC URL, http://localhost:8080/jsonrpc + type: str required: true username: description: NSO username + type: str required: true password: description: NSO password + type: str required: true timeout: description: JSON-RPC request timeout in seconds + type: int default: 300 version_added: "2.6" ''' diff --git a/lib/ansible/plugins/doc_fragments/nxos.py b/lib/ansible/plugins/doc_fragments/nxos.py index 24cc086c83..994d5a6ccf 100644 --- a/lib/ansible/plugins/doc_fragments/nxos.py +++ b/lib/ansible/plugins/doc_fragments/nxos.py @@ -7,7 +7,7 @@ class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -93,7 +93,7 @@ options: default: cli use_ssl: description: - - Configures the I(transport) to use SSL if set to true only when the + - Configures the I(transport) to use SSL if set to C(yes) only when the C(transport=nxapi), otherwise this value is ignored. type: bool default: no @@ -115,4 +115,4 @@ notes: - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide ` - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Cisco devices see the `Cisco integration page `_. -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/onyx.py b/lib/ansible/plugins/doc_fragments/onyx.py index 0cc80cee97..86bc543530 100644 --- a/lib/ansible/plugins/doc_fragments/onyx.py +++ b/lib/ansible/plugins/doc_fragments/onyx.py @@ -1,38 +1,29 @@ -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -40,17 +31,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -59,6 +53,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path authorize: description: - Instructs the module to enter privileged mode on the remote device @@ -67,11 +62,12 @@ options: is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTHORIZE) will be used instead. type: bool - default: 'no' + default: no auth_pass: description: - Specifies the password to use if required to enter privileged mode on the remote device. If I(authorize) is false, then this argument does nothing. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_AUTH_PASS) will be used instead. -""" + type: str +''' diff --git a/lib/ansible/plugins/doc_fragments/openswitch.py b/lib/ansible/plugins/doc_fragments/openswitch.py index b0dfaec342..b4eac582dc 100644 --- a/lib/ansible/plugins/doc_fragments/openswitch.py +++ b/lib/ansible/plugins/doc_fragments/openswitch.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: host: description: @@ -28,7 +15,7 @@ options: device over the specified transport. The value of host is used as the destination address for the transport. Note this argument does not affect the SSH argument. - required: true + type: str port: description: - Specifies the port to use when building the connection to the remote @@ -36,6 +23,7 @@ options: value will default to the appropriate transport common port if none is provided in the task. (cli=22, http=80, https=443). Note this argument does not affect the SSH transport. + type: int default: 0 (use common port) username: description: @@ -45,6 +33,7 @@ options: transport is used. Note this argument does not affect the SSH transport. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to @@ -52,11 +41,13 @@ options: or I(rest) transports. Note this argument does not affect the SSH transport. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -64,25 +55,27 @@ options: the remote device. This argument is only used for the I(cli) transports. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path transport: description: - Configures the transport connection to use when connecting to the remote device. The transport argument supports connectivity to the device over ssh, cli or REST. required: true + type: str + choices: [ cli, rest, ssh ] default: ssh - choices: ['ssh', 'cli', 'rest'] use_ssl: description: - - Configures the I(transport) to use SSL if set to true only when the + - Configures the I(transport) to use SSL if set to C(yes) only when the I(transport) argument is configured as rest. If the transport argument is not I(rest), this value is ignored. type: bool - default: 'yes' + default: yes provider: description: - Convenience method that allows all I(openswitch) arguments to be passed as a dict object. All constraints (required, choices, etc) must be met either by individual arguments or values in this dict. - -""" + type: dict +''' diff --git a/lib/ansible/plugins/doc_fragments/panos.py b/lib/ansible/plugins/doc_fragments/panos.py index eb666699f4..cb1a6e6038 100644 --- a/lib/ansible/plugins/doc_fragments/panos.py +++ b/lib/ansible/plugins/doc_fragments/panos.py @@ -2,24 +2,26 @@ # Copyright: (c) 2016, techbizdev # Copyright: (c) 2018, Kevin Breit (@kbreit) - # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = ''' + DOCUMENTATION = r''' options: ip_address: description: - IP address (or hostname) of PAN-OS device. + type: str required: true password: description: - Password for authentication. + type: str required: true username: description: - Username for authentication. - default: "admin" + type: str + default: admin ''' diff --git a/lib/ansible/plugins/doc_fragments/sros.py b/lib/ansible/plugins/doc_fragments/sros.py index 667e9800eb..be66404368 100644 --- a/lib/ansible/plugins/doc_fragments/sros.py +++ b/lib/ansible/plugins/doc_fragments/sros.py @@ -1,41 +1,31 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -43,17 +33,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -62,6 +55,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path notes: - For more information on using Ansible to manage Nokia SR OS Network devices see U(https://www.ansible.com/ansible-nokia). -""" +''' diff --git a/lib/ansible/plugins/doc_fragments/vyos.py b/lib/ansible/plugins/doc_fragments/vyos.py index 661c76ebe8..12d06913a3 100644 --- a/lib/ansible/plugins/doc_fragments/vyos.py +++ b/lib/ansible/plugins/doc_fragments/vyos.py @@ -1,26 +1,13 @@ -# -# (c) 2015, Peter Sprygada -# -# This file is part of Ansible -# -# Ansible is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Ansible is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with Ansible. If not, see . +# -*- coding: utf-8 -*- + +# Copyright: (c) 2015, Peter Sprygada +# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # Standard files documentation fragment - DOCUMENTATION = """ + DOCUMENTATION = r''' options: provider: description: @@ -29,17 +16,20 @@ options: - For more information please see the L(Network Guide, ../network/getting_started/network_differences.html#multiple-communication-protocols). - HORIZONTALLINE - A dict object containing connection details. + type: dict suboptions: host: description: - Specifies the DNS host name or address for connecting to the remote device over the specified transport. The value of host is used as the destination address for the transport. + type: str required: true port: description: - Specifies the port to use when building the connection to the remote device. + type: int default: 22 username: description: @@ -47,17 +37,20 @@ options: the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_USERNAME) will be used instead. + type: str password: description: - Specifies the password to use to authenticate the connection to the remote device. This value is used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_PASSWORD) will be used instead. + type: str timeout: description: - Specifies the timeout in seconds for communicating with the network device for either connecting or sending commands. If the timeout is exceeded before the operation is completed, the module will error. + type: int default: 10 ssh_keyfile: description: @@ -66,6 +59,7 @@ options: key used to authenticate the SSH session. If the value is not specified in the task, the value of environment variable C(ANSIBLE_NET_SSH_KEYFILE) will be used instead. + type: path notes: - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` -""" +'''