diff --git a/lib/ansible/modules/network/cli/cli_command.py b/lib/ansible/modules/network/cli/cli_command.py index d89ece1b19..08bb262028 100644 --- a/lib/ansible/modules/network/cli/cli_command.py +++ b/lib/ansible/modules/network/cli/cli_command.py @@ -19,6 +19,7 @@ author: "Nathaniel Case (@qalthos)" short_description: Run a cli command on cli-based network devices description: - Sends a command to a network device and returns the result read from the device. +extends_documentation_fragment: network_agnostic options: command: description: diff --git a/lib/ansible/modules/network/cli/cli_config.py b/lib/ansible/modules/network/cli/cli_config.py index 72cdf25834..0e893bf476 100644 --- a/lib/ansible/modules/network/cli/cli_config.py +++ b/lib/ansible/modules/network/cli/cli_config.py @@ -22,6 +22,7 @@ short_description: Push text based configuration to network devices over network description: - This module provides platform agnostic way of pushing text based configuration to network devices over network_cli connection plugin. +extends_documentation_fragment: network_agnostic options: config: description: diff --git a/lib/ansible/modules/network/files/net_get.py b/lib/ansible/modules/network/files/net_get.py index 8f3a6957e8..74a5285f4b 100644 --- a/lib/ansible/modules/network/files/net_get.py +++ b/lib/ansible/modules/network/files/net_get.py @@ -22,6 +22,7 @@ short_description: Copy a file from a network device to Ansible Controller description: - This module provides functionality to copy file from network device to ansible controller. +extends_documentation_fragment: network_agnostic options: src: description: diff --git a/lib/ansible/modules/network/files/net_put.py b/lib/ansible/modules/network/files/net_put.py index ef6e298d88..5c52fcf60b 100644 --- a/lib/ansible/modules/network/files/net_put.py +++ b/lib/ansible/modules/network/files/net_put.py @@ -22,6 +22,7 @@ short_description: Copy a file from Ansible Controller to a network device description: - This module provides functionality to copy file from Ansible controller to network devices. +extends_documentation_fragment: network_agnostic options: src: description: diff --git a/lib/ansible/modules/network/interface/net_interface.py b/lib/ansible/modules/network/interface/net_interface.py index 89d6f12876..c9eed8a809 100644 --- a/lib/ansible/modules/network/interface/net_interface.py +++ b/lib/ansible/modules/network/interface/net_interface.py @@ -22,6 +22,7 @@ short_description: Manage Interface on network devices description: - This module provides declarative management of Interfaces on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/interface/net_linkagg.py b/lib/ansible/modules/network/interface/net_linkagg.py index 45681cbef2..9091d8401c 100644 --- a/lib/ansible/modules/network/interface/net_linkagg.py +++ b/lib/ansible/modules/network/interface/net_linkagg.py @@ -22,6 +22,7 @@ short_description: Manage link aggregation groups on network devices description: - This module provides declarative management of link aggregation groups on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/interface/net_lldp_interface.py b/lib/ansible/modules/network/interface/net_lldp_interface.py index 1a3df64a3f..52f8964870 100644 --- a/lib/ansible/modules/network/interface/net_lldp_interface.py +++ b/lib/ansible/modules/network/interface/net_lldp_interface.py @@ -21,6 +21,7 @@ short_description: Manage LLDP interfaces configuration on network devices description: - This module provides declarative management of LLDP interfaces configuration on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/layer2/net_l2_interface.py b/lib/ansible/modules/network/layer2/net_l2_interface.py index 0d8e4d55c0..2315ebca4e 100644 --- a/lib/ansible/modules/network/layer2/net_l2_interface.py +++ b/lib/ansible/modules/network/layer2/net_l2_interface.py @@ -21,6 +21,7 @@ short_description: Manage Layer-2 interface on network devices description: - This module provides declarative management of Layer-2 interface on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/layer2/net_vlan.py b/lib/ansible/modules/network/layer2/net_vlan.py index df8a8cbb82..13fe1fab37 100644 --- a/lib/ansible/modules/network/layer2/net_vlan.py +++ b/lib/ansible/modules/network/layer2/net_vlan.py @@ -22,6 +22,7 @@ short_description: Manage VLANs on network devices description: - This module provides declarative management of VLANs on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/layer3/net_l3_interface.py b/lib/ansible/modules/network/layer3/net_l3_interface.py index db842e5046..37d925e851 100644 --- a/lib/ansible/modules/network/layer3/net_l3_interface.py +++ b/lib/ansible/modules/network/layer3/net_l3_interface.py @@ -22,6 +22,7 @@ short_description: Manage L3 interfaces on network devices description: - This module provides declarative management of L3 interfaces on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/layer3/net_vrf.py b/lib/ansible/modules/network/layer3/net_vrf.py index b2bca19a48..416f08f64a 100644 --- a/lib/ansible/modules/network/layer3/net_vrf.py +++ b/lib/ansible/modules/network/layer3/net_vrf.py @@ -22,6 +22,7 @@ short_description: Manage VRFs on network devices description: - This module provides declarative management of VRFs on network devices. +extends_documentation_fragment: network_agnostic options: name: description: diff --git a/lib/ansible/modules/network/netconf/netconf_config.py b/lib/ansible/modules/network/netconf/netconf_config.py index 5463dc87b2..9671cd4738 100644 --- a/lib/ansible/modules/network/netconf/netconf_config.py +++ b/lib/ansible/modules/network/netconf/netconf_config.py @@ -23,7 +23,9 @@ description: the IETF. It is documented in RFC 6241. - This module allows the user to send a configuration XML file to a netconf device, and detects if there was a configuration change. -extends_documentation_fragment: netconf +extends_documentation_fragment: + - netconf + - network_agnostic options: content: description: diff --git a/lib/ansible/modules/network/netconf/netconf_get.py b/lib/ansible/modules/network/netconf/netconf_get.py index 2ccd9f2c8b..debed8c91a 100644 --- a/lib/ansible/modules/network/netconf/netconf_get.py +++ b/lib/ansible/modules/network/netconf/netconf_get.py @@ -26,6 +26,7 @@ description: the IETF. It is documented in RFC 6241. - This module allows the user to fetch configuration and state data from NETCONF enabled network devices. +extends_documentation_fragment: network_agnostic options: source: description: diff --git a/lib/ansible/modules/network/netconf/netconf_rpc.py b/lib/ansible/modules/network/netconf/netconf_rpc.py index 6878b9488a..1bebeb6394 100644 --- a/lib/ansible/modules/network/netconf/netconf_rpc.py +++ b/lib/ansible/modules/network/netconf/netconf_rpc.py @@ -26,6 +26,7 @@ description: the IETF. It is documented in RFC 6241. - This module allows the user to execute NETCONF RPC requests as defined by IETF RFC standards as well as proprietary requests. +extends_documentation_fragment: network_agnostic options: rpc: description: diff --git a/lib/ansible/modules/network/protocol/net_lldp.py b/lib/ansible/modules/network/protocol/net_lldp.py index ec6a875c0b..6a605493ad 100644 --- a/lib/ansible/modules/network/protocol/net_lldp.py +++ b/lib/ansible/modules/network/protocol/net_lldp.py @@ -22,6 +22,7 @@ short_description: Manage LLDP service configuration on network devices description: - This module provides declarative management of LLDP service configuration on network devices. +extends_documentation_fragment: network_agnostic options: state: description: diff --git a/lib/ansible/modules/network/system/net_banner.py b/lib/ansible/modules/network/system/net_banner.py index 26c27095a2..3bdee71f8c 100644 --- a/lib/ansible/modules/network/system/net_banner.py +++ b/lib/ansible/modules/network/system/net_banner.py @@ -21,6 +21,7 @@ description: - This will configure both login and motd banners on network devices. It allows playbooks to add or remove banner text from the active running configuration. +extends_documentation_fragment: network_agnostic options: banner: description: diff --git a/lib/ansible/modules/network/system/net_logging.py b/lib/ansible/modules/network/system/net_logging.py index 45f328dd81..7430e1c8fb 100644 --- a/lib/ansible/modules/network/system/net_logging.py +++ b/lib/ansible/modules/network/system/net_logging.py @@ -22,6 +22,7 @@ short_description: Manage logging on network devices description: - This module provides declarative management of logging on network devices. +extends_documentation_fragment: network_agnostic options: dest: description: diff --git a/lib/ansible/modules/network/system/net_ping.py b/lib/ansible/modules/network/system/net_ping.py index fe2eb39dab..a8c23cc9e6 100644 --- a/lib/ansible/modules/network/system/net_ping.py +++ b/lib/ansible/modules/network/system/net_ping.py @@ -23,6 +23,7 @@ description: - Tests reachability using ping from network device to a remote destination. - For Windows targets, use the M(win_ping) module instead. - For targets running Python, use the M(ping) module instead. +extends_documentation_fragment: network_agnostic options: count: description: diff --git a/lib/ansible/modules/network/system/net_system.py b/lib/ansible/modules/network/system/net_system.py index b4f15cb872..7dd44dc4e2 100644 --- a/lib/ansible/modules/network/system/net_system.py +++ b/lib/ansible/modules/network/system/net_system.py @@ -24,6 +24,7 @@ description: on network devices. It provides an option to configure host system parameters or remove those parameters from the device active configuration. +extends_documentation_fragment: network_agnostic options: hostname: description: diff --git a/lib/ansible/modules/network/system/net_user.py b/lib/ansible/modules/network/system/net_user.py index 41d8fc47dd..10785b7ca5 100644 --- a/lib/ansible/modules/network/system/net_user.py +++ b/lib/ansible/modules/network/system/net_user.py @@ -24,6 +24,7 @@ description: either individual usernames or the aggregate of usernames in the current running config. It also supports purging usernames from the configuration that are not explicitly defined. +extends_documentation_fragment: network_agnostic options: aggregate: description: diff --git a/lib/ansible/plugins/doc_fragments/network_agnostic.py b/lib/ansible/plugins/doc_fragments/network_agnostic.py new file mode 100644 index 0000000000..d76e18555a --- /dev/null +++ b/lib/ansible/plugins/doc_fragments/network_agnostic.py @@ -0,0 +1,27 @@ +# 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 . + + +class ModuleDocFragment(object): + + # Standard files documentation fragment + DOCUMENTATION = ''' +options: {} +notes: + - This module is supported on C(ansible_network_os) network platforms. See + the :ref:`Network Platform Options ` for details. +'''