From dfcae9fc8efb06bd807db0673a9d4f89de31fdf9 Mon Sep 17 00:00:00 2001 From: Nathaniel Case Date: Wed, 7 Feb 2018 16:33:11 -0500 Subject: [PATCH] Remove potentially confusing `provider` from module documentation (#35851) --- lib/ansible/modules/network/ios/ios_ping.py | 9 ------- .../modules/network/junos/junos_config.py | 5 ---- lib/ansible/modules/network/nxos/nxos_acl.py | 1 - .../modules/network/nxos/nxos_command.py | 24 ++++--------------- .../modules/network/system/net_ping.py | 10 -------- 5 files changed, 4 insertions(+), 45 deletions(-) diff --git a/lib/ansible/modules/network/ios/ios_ping.py b/lib/ansible/modules/network/ios/ios_ping.py index 920092bfe83..743045bf2d4 100644 --- a/lib/ansible/modules/network/ios/ios_ping.py +++ b/lib/ansible/modules/network/ios/ios_ping.py @@ -55,31 +55,22 @@ notes: ''' EXAMPLES = r''' -- provider: - host: "{{ ansible_host }}" - username: "{{ username }}" - password: "{{ password }}" - - name: Test reachability to 10.10.10.10 using default vrf ios_ping: - provider: "{{ provider }}" dest: 10.10.10.10 - name: Test reachability to 10.20.20.20 using prod vrf ios_ping: - provider: "{{ provider }}" dest: 10.20.20.20 vrf: prod - name: Test unreachability to 10.30.30.30 using default vrf ios_ping: - provider: "{{ provider }}" dest: 10.30.30.30 state: absent - name: Test reachability to 10.40.40.40 using prod vrf and setting count and source ios_ping: - provider: "{{ provider }}" dest: 10.40.40.40 source: loopback0 vrf: prod diff --git a/lib/ansible/modules/network/junos/junos_config.py b/lib/ansible/modules/network/junos/junos_config.py index 7a73c6fd269..10e6d7e3d2b 100644 --- a/lib/ansible/modules/network/junos/junos_config.py +++ b/lib/ansible/modules/network/junos/junos_config.py @@ -152,7 +152,6 @@ EXAMPLES = """ junos_config: src: srx.cfg comment: update config - provider: "{{ netconf }}" - name: load configure lines into device junos_config: @@ -160,22 +159,18 @@ EXAMPLES = """ - set interfaces ge-0/0/1 unit 0 description "Test interface" - set vlans vlan01 description "Test vlan" comment: update config - provider: "{{ netconf }}" - name: rollback the configuration to id 10 junos_config: rollback: 10 - provider: "{{ netconf }}" - name: zero out the current configuration junos_config: zeroize: yes - provider: "{{ netconf }}" - name: confirm a previous commit junos_config: confirm_commit: yes - provider: "{{ netconf }}" """ RETURN = """ diff --git a/lib/ansible/modules/network/nxos/nxos_acl.py b/lib/ansible/modules/network/nxos/nxos_acl.py index 865f48a9b80..1c464d84ee2 100644 --- a/lib/ansible/modules/network/nxos/nxos_acl.py +++ b/lib/ansible/modules/network/nxos/nxos_acl.py @@ -210,7 +210,6 @@ EXAMPLES = ''' src: 1.1.1.1/24 dest: any state: present - provider: "{{ nxos_provider }}" ''' RETURN = ''' diff --git a/lib/ansible/modules/network/nxos/nxos_command.py b/lib/ansible/modules/network/nxos/nxos_command.py index 8ebc0e9578f..afd95bee459 100644 --- a/lib/ansible/modules/network/nxos/nxos_command.py +++ b/lib/ansible/modules/network/nxos/nxos_command.py @@ -26,11 +26,10 @@ description: options: commands: description: - - The commands to send to the remote NXOS device over the - configured provider. The resulting output from the command - is returned. If the I(wait_for) argument is provided, the - module is not returned until the condition is satisfied or - the number of retires as expired. + - The commands to send to the remote NXOS device. The resulting + output from the command is returned. If the I(wait_for) + argument is provided, the module is not returned until the + condition is satisfied or the number of retires as expired. - The I(commands) argument also accepts an alternative form that allows for complex values that specify the command to run and the output format to return. This can be done @@ -79,34 +78,21 @@ options: """ EXAMPLES = """ -# Note: examples below use the following provider dict to handle -# transport and authentication to the node. ---- -vars: - cli: - host: "{{ inventory_hostname }}" - username: admin - password: admin - transport: cli - --- - name: run show version on remote devices nxos_command: commands: show version - provider: "{{ cli }}" - name: run show version and check to see if output contains Cisco nxos_command: commands: show version wait_for: result[0] contains Cisco - provider: "{{ cli }}" - name: run multiple commands on remote nodes nxos_command: commands: - show version - show interfaces - provider: "{{ cli }}" - name: run multiple commands and evaluate the output nxos_command: @@ -116,14 +102,12 @@ vars: wait_for: - result[0] contains Cisco - result[1] contains loopback0 - provider: "{{ cli }}" - name: run commands and specify the output format nxos_command: commands: - command: show version output: json - provider: "{{ cli }}" """ RETURN = """ diff --git a/lib/ansible/modules/network/system/net_ping.py b/lib/ansible/modules/network/system/net_ping.py index 13b3817a845..67698a248a0 100644 --- a/lib/ansible/modules/network/system/net_ping.py +++ b/lib/ansible/modules/network/system/net_ping.py @@ -55,32 +55,22 @@ notes: EXAMPLES = r''' -- provider: - host: "{{ ansible_host }}" - username: "{{ username }}" - password: "{{ password }}" - network_os: "{{ network_os }}" - - name: Test reachability to 10.10.10.10 using default vrf net_ping: - provider: "{{ provider }}" dest: 10.10.10.10 - name: Test reachability to 10.20.20.20 using prod vrf net_ping: - provider: "{{ provider }}" dest: 10.20.20.20 vrf: prod - name: Test unreachability to 10.30.30.30 using default vrf net_ping: - provider: "{{ provider }}" dest: 10.30.30.30 state: absent - name: Test reachability to 10.40.40.40 using prod vrf and setting count and source net_ping: - provider: "{{ provider }}" dest: 10.40.40.40 source: loopback0 vrf: prod