diff --git a/lib/ansible/modules/network/cnos/cnos_backup.py b/lib/ansible/modules/network/cnos/cnos_backup.py
index 1fae9eeb63..6088ccd876 100644
--- a/lib/ansible/modules/network/cnos/cnos_backup.py
+++ b/lib/ansible/modules/network/cnos/cnos_backup.py
@@ -47,9 +47,7 @@ description:
well. This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_backup.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -105,11 +103,7 @@ Tasks : The following are examples of using the module cnos_backup.
---
- name: Test Running Config Backup
cnos_backup:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "sftp"
@@ -120,11 +114,7 @@ Tasks : The following are examples of using the module cnos_backup.
- name: Test Startup Config Backup
cnos_backup:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "sftp"
@@ -135,11 +125,7 @@ Tasks : The following are examples of using the module cnos_backup.
- name: Test Running Config Backup -TFTP
cnos_backup:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "tftp"
@@ -150,11 +136,7 @@ Tasks : The following are examples of using the module cnos_backup.
- name: Test Startup Config Backup - TFTP
cnos_backup:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_backup_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "tftp"
@@ -248,9 +230,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
configType=dict(required=True),
diff --git a/lib/ansible/modules/network/cnos/cnos_bgp.py b/lib/ansible/modules/network/cnos/cnos_bgp.py
index 726acf52d4..6a100f7785 100644
--- a/lib/ansible/modules/network/cnos/cnos_bgp.py
+++ b/lib/ansible/modules/network/cnos/cnos_bgp.py
@@ -47,9 +47,7 @@ description:
This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_bgp.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -140,11 +138,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
---
- name: Test BGP - neighbor
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "neighbor"
@@ -156,11 +150,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - BFD
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "neighbor"
@@ -170,11 +160,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - address-family - dampening
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "address-family"
@@ -188,11 +174,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - address-family - network
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "address-family"
@@ -203,11 +185,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - bestpath - always-compare-med
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "bestpath"
@@ -215,11 +193,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - bestpath-compare-confed-aspat
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "bestpath"
@@ -227,11 +201,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - bgp
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "bgp"
@@ -239,11 +209,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - cluster-id
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "cluster-id"
@@ -251,11 +217,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - confederation-identifier
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "confederation"
@@ -264,33 +226,21 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - enforce-first-as
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "enforce-first-as"
- name: Test BGP - fast-external-failover
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "fast-external-failover"
- name: Test BGP - graceful-restart
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "graceful-restart"
@@ -298,22 +248,14 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - graceful-restart-helper
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "graceful-restart-helper"
- name: Test BGP - maxas-limit
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "maxas-limit"
@@ -321,11 +263,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - neighbor
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "neighbor"
@@ -337,11 +275,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - router-id
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "router-id"
@@ -349,22 +283,14 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - synchronization
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "synchronization"
- name: Test BGP - timers
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "timers"
@@ -373,11 +299,7 @@ Tasks: The following are examples of using the module cnos_bgp. These are
- name: Test BGP - vrf
cnos_bgp:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_bgp_{{ inventory_hostname }}_output.txt"
asNum: 33
bgpArg1: "vrf"
@@ -1217,9 +1139,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
bgpArg1=dict(required=True),
diff --git a/lib/ansible/modules/network/cnos/cnos_conditional_command.py b/lib/ansible/modules/network/cnos/cnos_conditional_command.py
index dd01ece2ee..52233260a4 100644
--- a/lib/ansible/modules/network/cnos/cnos_conditional_command.py
+++ b/lib/ansible/modules/network/cnos/cnos_conditional_command.py
@@ -49,9 +49,7 @@ description:
Usually, commands are executed across a group of network devices. When
there is a requirement to skip the execution of the command on one or
more devices, it is recommended to use this module. This module uses SSH to
- manage network device configuration. For more information about this module
- from Lenovo and customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_conditional_command.html)
+ manage network device configuration.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -84,11 +82,7 @@ Tasks : The following are examples of using the module
---
- name: Applying CLI template on VLAG Tier1 Leaf Switch1
cnos_conditional_command:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_conditional_command_
{{ inventory_hostname }}_output.txt"
condition: "{{ hostvars[inventory_hostname]['condition']}}"
@@ -128,10 +122,10 @@ def main():
outputfile=dict(required=True),
condition=dict(required=True),
flag=dict(required=True),
- host=dict(required=True),
+ host=dict(required=False),
deviceType=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False,
no_log=True), ), supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_conditional_template.py b/lib/ansible/modules/network/cnos/cnos_conditional_template.py
index 8a70a7a80d..6407fecbb3 100644
--- a/lib/ansible/modules/network/cnos/cnos_conditional_template.py
+++ b/lib/ansible/modules/network/cnos/cnos_conditional_template.py
@@ -50,10 +50,7 @@ description:
Usually, templates are used when commands are the same across a group of
network devices. When there is a requirement to skip the execution of the
template on one or more devices, it is recommended to use this module.
- This module uses SSH to manage network device configuration. For more
- information about this module and customizing it usage for your use cases,
- please visit U(http://systemx.lenovofiles.com/help/index.jsp?topic=
- %2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_conditional_template.html)
+ This module uses SSH to manage network device configuration.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -93,9 +90,6 @@ Tasks : The following are examples of using the module
---
- name: Applying CLI template on VLAG Tier1 Leaf Switch1
cnos_conditional_template:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/vlag_1tier_leaf_switch1_
{{ inventory_hostname }}_output.txt"
@@ -103,7 +97,6 @@ Tasks : The following are examples of using the module
flag: "leaf_switch1"
commandfile: "./commands/vlag_1tier_leaf_switch1_
{{ inventory_hostname }}_commands.txt"
- enablePassword: "anil"
stp_mode1: "disable"
port_range1: "17,18,29,30"
portchannel_interface_number1: 1001
@@ -143,10 +136,10 @@ def main():
outputfile=dict(required=True),
condition=dict(required=True),
flag=dict(required=True),
- host=dict(required=True),
+ host=dict(required=False),
deviceType=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),),
supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_config.py b/lib/ansible/modules/network/cnos/cnos_config.py
index 8e63b3f8e9..a6467aa192 100644
--- a/lib/ansible/modules/network/cnos/cnos_config.py
+++ b/lib/ansible/modules/network/cnos/cnos_config.py
@@ -37,7 +37,7 @@ description:
an implementation for working with CNOS configuration sections in
a deterministic way.
notes:
- - Tested against CNOS 10.8.0.42
+ - Tested against CNOS 10.8.1
options:
provider:
version_added: "2.6"
diff --git a/lib/ansible/modules/network/cnos/cnos_factory.py b/lib/ansible/modules/network/cnos/cnos_factory.py
index ee6a9f1ec5..dd1cda3737 100644
--- a/lib/ansible/modules/network/cnos/cnos_factory.py
+++ b/lib/ansible/modules/network/cnos/cnos_factory.py
@@ -42,9 +42,6 @@ description:
topology as a new network device. This module uses SSH to manage network
device configuration. The result of the operation can be viewed in results
directory.
- For more information about this module and customizing it usage
- for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_factory.html)
version_added: "2.3"
extends_documentation_fragment: cnos
options: {}
@@ -56,9 +53,6 @@ Tasks : The following are examples of using the module cnos_reload. These are
---
- name: Test Reset to factory
cnos_factory:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_factory_{{ inventory_hostname }}_output.txt"
@@ -91,9 +85,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),),
supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_facts.py b/lib/ansible/modules/network/cnos/cnos_facts.py
index 5abcb23d15..11cc1bf874 100644
--- a/lib/ansible/modules/network/cnos/cnos_facts.py
+++ b/lib/ansible/modules/network/cnos/cnos_facts.py
@@ -36,7 +36,7 @@ description:
module will always collect a base set of facts from the device
and can enable or disable collection of additional facts.
notes:
- - Tested against CNOS 10.8.0.42
+ - Tested against CNOS 10.8.1
options:
authorize:
version_added: "2.6"
diff --git a/lib/ansible/modules/network/cnos/cnos_image.py b/lib/ansible/modules/network/cnos/cnos_image.py
index ccc07caaad..d7da989cd8 100644
--- a/lib/ansible/modules/network/cnos/cnos_image.py
+++ b/lib/ansible/modules/network/cnos/cnos_image.py
@@ -48,9 +48,6 @@ description:
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
playbook is run.
- For more information about this module from Lenovo and customizing it
- usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_image.html)
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -94,11 +91,7 @@ Tasks : The following are examples of using the module cnos_image. These are
---
- name: Test Image transfer
cnos_image:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_image_{{ inventory_hostname }}_output.txt"
protocol: "sftp"
serverip: "10.241.106.118"
@@ -109,11 +102,7 @@ Tasks : The following are examples of using the module cnos_image. These are
- name: Test Image tftp
cnos_image:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_image_{{ inventory_hostname }}_output.txt"
protocol: "tftp"
serverip: "10.241.106.118"
@@ -205,9 +194,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
protocol=dict(required=True),
diff --git a/lib/ansible/modules/network/cnos/cnos_interface.py b/lib/ansible/modules/network/cnos/cnos_interface.py
index a0a9386051..c84b400a4d 100644
--- a/lib/ansible/modules/network/cnos/cnos_interface.py
+++ b/lib/ansible/modules/network/cnos/cnos_interface.py
@@ -50,8 +50,6 @@ description:
This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the playbook is run.
- For more information about this module from Lenovo and customizing it usage for your
- use cases, please visit U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_interface.html)
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -134,11 +132,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
---
- name: Test Interface Ethernet - channel-group
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 1
@@ -148,11 +142,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - switchport
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -162,11 +152,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - switchport mode
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -176,11 +162,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - Description
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -189,11 +171,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - Duplex
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 1
@@ -202,11 +180,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - flowcontrol
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -216,11 +190,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - lacp
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -230,11 +200,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - lldp
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -244,11 +210,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - load-interval
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -259,11 +221,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - mac
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -272,11 +230,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - microburst-detection
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -285,11 +239,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - mtu
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -298,11 +248,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - service-policy
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -312,11 +258,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - speed
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 1
@@ -325,11 +267,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - storm
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -339,11 +277,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - vlan
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -352,11 +286,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - vrrp
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -365,11 +295,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - spanning tree1
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -379,11 +305,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - spanning tree 2
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -395,11 +317,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - ip1
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -410,11 +328,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - ip2
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -424,11 +338,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - bfd
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -440,11 +350,7 @@ Tasks : The following are examples of using the module cnos_interface. These are
- name: Test Interface Ethernet - bfd
cnos_interface:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_interface_{{ inventory_hostname }}_output.txt"
interfaceOption: 'ethernet'
interfaceRange: 33
@@ -489,9 +395,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
interfaceRange=dict(required=False),
diff --git a/lib/ansible/modules/network/cnos/cnos_portchannel.py b/lib/ansible/modules/network/cnos/cnos_portchannel.py
index 275173d972..c6554081a7 100644
--- a/lib/ansible/modules/network/cnos/cnos_portchannel.py
+++ b/lib/ansible/modules/network/cnos/cnos_portchannel.py
@@ -45,9 +45,7 @@ description:
This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_portchannel.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -159,9 +157,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
---
- name: Test Port Channel - channel-group
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{inventory_hostname}}_output.txt"
interfaceRange: 33
@@ -171,9 +166,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - channel-group - Interface Range
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: "1/1-2"
@@ -183,9 +175,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - bridge-port
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -195,9 +184,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - bridgeport mode
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -207,9 +193,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - Description
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -218,9 +201,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - Duplex
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -229,9 +209,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - flowcontrol
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -241,9 +218,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - lacp
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -253,9 +227,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - lldp
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -265,9 +236,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - load-interval
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -278,9 +246,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - microburst-detection
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -289,9 +254,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - mtu
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -300,9 +262,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - service-policy
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -312,9 +271,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - speed
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -323,9 +279,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - storm
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -335,9 +288,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - vlan
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -346,9 +296,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - vrrp
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -357,9 +304,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - spanning tree1
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -369,9 +313,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - spanning tree 2
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -383,9 +324,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - ip1
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -396,9 +334,6 @@ Tasks : The following are examples of using the module cnos_portchannel. These
- name: Test Port Channel - ip2
cnos_portchannel:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
outputfile: "./results/test_portchannel_{{ inventory_hostname }}_output.txt"
interfaceRange: 33
@@ -473,9 +408,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
interfaceRange=dict(required=False),
diff --git a/lib/ansible/modules/network/cnos/cnos_reload.py b/lib/ansible/modules/network/cnos/cnos_reload.py
index 1e0319552a..7f0975906d 100644
--- a/lib/ansible/modules/network/cnos/cnos_reload.py
+++ b/lib/ansible/modules/network/cnos/cnos_reload.py
@@ -40,9 +40,6 @@ description:
configuration has been saved over the startup configuration.
This module uses SSH to manage network device configuration.
The results of the operation can be viewed in results directory.
- For more information about this module and customizing it usage
- for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_reload.html)
version_added: "2.3"
extends_documentation_fragment: cnos
options: {}
@@ -54,11 +51,7 @@ Tasks : The following are examples of using the module cnos_reload. These are
---
- name: Test Reload
cnos_reload:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_reload_{{ inventory_hostname }}_output.txt"
'''
RETURN = '''
@@ -89,9 +82,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),),
supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_rollback.py b/lib/ansible/modules/network/cnos/cnos_rollback.py
index 34bd8b9309..2191ff1624 100644
--- a/lib/ansible/modules/network/cnos/cnos_rollback.py
+++ b/lib/ansible/modules/network/cnos/cnos_rollback.py
@@ -49,9 +49,7 @@ description:
the newly downloaded file. This module uses SSH to manage network device
configuration. The results of the operation will be placed in a directory
named 'results' that must be created by the user in their local directory
- to where the playbook is run. For more information about this module from
- Lenovo and customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_rollback.html)
+ to where the playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -106,11 +104,7 @@ Tasks : The following are examples of using the module cnos_rollback.
- name: Test Rollback of config - Running config
cnos_rolback:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "sftp"
@@ -121,11 +115,7 @@ Tasks : The following are examples of using the module cnos_rollback.
- name: Test Rollback of config - Startup config
cnos_rolback:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "sftp"
@@ -136,11 +126,7 @@ Tasks : The following are examples of using the module cnos_rollback.
- name: Test Rollback of config - Running config - TFTP
cnos_rolback:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: running-config
protocol: "tftp"
@@ -151,11 +137,7 @@ Tasks : The following are examples of using the module cnos_rollback.
- name: Test Rollback of config - Startup config - TFTP
cnos_rolback:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_rollback_{{ inventory_hostname }}_output.txt"
configType: startup-config
protocol: "tftp"
@@ -258,9 +240,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
configType=dict(required=True),
diff --git a/lib/ansible/modules/network/cnos/cnos_save.py b/lib/ansible/modules/network/cnos/cnos_save.py
index 97e3c5deb1..3a29be9d54 100644
--- a/lib/ansible/modules/network/cnos/cnos_save.py
+++ b/lib/ansible/modules/network/cnos/cnos_save.py
@@ -42,9 +42,7 @@ description:
restart. This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_save.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options: {}
@@ -56,11 +54,7 @@ Tasks : The following are examples of using the module cnos_save. These are
---
- name: Test Save
cnos_save:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_save_{{ inventory_hostname }}_output.txt"
'''
RETURN = '''
@@ -91,9 +85,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),),
supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_showrun.py b/lib/ansible/modules/network/cnos/cnos_showrun.py
index 78bf5538f6..35546d555d 100644
--- a/lib/ansible/modules/network/cnos/cnos_showrun.py
+++ b/lib/ansible/modules/network/cnos/cnos_showrun.py
@@ -41,9 +41,7 @@ description:
device. This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_showrun.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options: {}
@@ -55,11 +53,7 @@ Tasks : The following are examples of using the module cnos_showrun. These are
---
- name: Run show running-config
cnos_showrun:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_showrun_{{ inventory_hostname }}_output.txt"
'''
@@ -91,9 +85,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),),
supports_check_mode=False)
diff --git a/lib/ansible/modules/network/cnos/cnos_template.py b/lib/ansible/modules/network/cnos/cnos_template.py
index 86962da75b..854bc5a3db 100644
--- a/lib/ansible/modules/network/cnos/cnos_template.py
+++ b/lib/ansible/modules/network/cnos/cnos_template.py
@@ -42,8 +42,6 @@ description:
This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the playbook is run.
- For more information about this module from Lenovo and customizing it usage for your
- use cases, please visit U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_template.html)
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -73,11 +71,7 @@ Tasks : The following are examples of using the module cnos_template. These are
- name: Applying CLI commands on Switches
cnos_template:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
commandfile: "./commands/demo_template_{{ inventory_hostname }}_commands.txt"
outputfile: "./results/demo_template_command_{{ inventory_hostname }}_output.txt"
@@ -112,10 +106,10 @@ def main():
argument_spec=dict(
commandfile=dict(required=True),
outputfile=dict(required=True),
- host=dict(required=True),
+ host=dict(required=False),
deviceType=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),),
supports_check_mode=False)
commandfile = module.params['commandfile']
diff --git a/lib/ansible/modules/network/cnos/cnos_vlag.py b/lib/ansible/modules/network/cnos/cnos_vlag.py
index c7d34f11e6..b8b4729606 100644
--- a/lib/ansible/modules/network/cnos/cnos_vlag.py
+++ b/lib/ansible/modules/network/cnos/cnos_vlag.py
@@ -46,9 +46,7 @@ description:
This module uses SSH to manage network device configuration.
The results of the operation will be placed in a directory named 'results'
that must be created by the user in their local directory to where the
- playbook is run. For more information about this module from Lenovo and
- customizing it usage for your use cases, please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_vlag.html)
+ playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -95,18 +93,12 @@ Tasks : The following are examples of using the module cnos_vlag. These are
---
- name: Test Vlag - enable
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "enable"
- name: Test Vlag - autorecovery
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "auto-recovery"
@@ -114,9 +106,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - config-consistency
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "config-consistency"
@@ -124,9 +113,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - isl
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "isl"
@@ -134,27 +120,18 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - mac-address-table
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "mac-address-table"
- name: Test Vlag - peer-gateway
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "peer-gateway"
- name: Test Vlag - priority
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "priority"
@@ -162,9 +139,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - startup-delay
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "startup-delay"
@@ -172,9 +146,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - tier-id
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "tier-id"
@@ -182,18 +153,12 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - vrrp
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "vrrp"
- name: Test Vlag - instance
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "instance"
@@ -202,9 +167,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - instance2
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "instance"
@@ -212,9 +174,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - keepalive-attempts
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "hlthchk"
@@ -223,9 +182,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - keepalive-interval
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "hlthchk"
@@ -234,9 +190,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - retry-interval
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "hlthchk"
@@ -245,9 +198,6 @@ Tasks : The following are examples of using the module cnos_vlag. These are
- name: Test Vlag - peer ip
cnos_vlag:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user']}}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass']}}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType']}}"
outputfile: "./results/cnos_vlag_{{ inventory_hostname }}_output.txt"
vlagArg1: "hlthchk"
@@ -461,9 +411,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
vlagArg1=dict(required=True),
diff --git a/lib/ansible/modules/network/cnos/cnos_vlan.py b/lib/ansible/modules/network/cnos/cnos_vlan.py
index 258ad03d4a..a92d13a3fa 100644
--- a/lib/ansible/modules/network/cnos/cnos_vlan.py
+++ b/lib/ansible/modules/network/cnos/cnos_vlan.py
@@ -47,10 +47,7 @@ description:
following arguments will be evaluated. This module uses SSH to manage
network device configuration. The results of the operation will be placed
in a directory named 'results' that must be created by the user in their
- local directory to where the playbook is run. For more information about
- this module from Lenovo and customizing it usage for your use cases,
- please visit
- U(http://systemx.lenovofiles.com/help/index.jsp?topic=%2Fcom.lenovo.switchmgt.ansible.doc%2Fcnos_vlan.html)
+ local directory to where the playbook is run.
version_added: "2.3"
extends_documentation_fragment: cnos
options:
@@ -98,11 +95,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
---
- name: Test Vlan - Create a vlan, name it
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: 13
vlanArg2: "name"
@@ -110,11 +103,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - Create a vlan, Flood configuration
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: 13
vlanArg2: "flood"
@@ -122,11 +111,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - Create a vlan, State configuration
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: 13
vlanArg2: "state"
@@ -134,11 +119,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - VLAN Access map1
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: "access-map"
vlanArg2: "Anil"
@@ -146,11 +127,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - VLAN Accep Map2
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: "access-map"
vlanArg2: "Anil"
@@ -159,11 +136,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - ip igmp snooping query interval
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: 13
vlanArg2: "ip"
@@ -172,11 +145,7 @@ Tasks: The following are examples of using the module cnos_vlan. These are
- name: Test Vlan - ip igmp snooping mrouter interface port-aggregation 23
cnos_vlan:
- host: "{{ inventory_hostname }}"
- username: "{{ hostvars[inventory_hostname]['ansible_ssh_user'] }}"
- password: "{{ hostvars[inventory_hostname]['ansible_ssh_pass'] }}"
deviceType: "{{ hostvars[inventory_hostname]['deviceType'] }}"
- enablePassword: "{{ hostvars[inventory_hostname]['enablePassword'] }}"
outputfile: "./results/test_vlan_{{ inventory_hostname }}_output.txt"
vlanArg1: 13
vlanArg2: "ip"
@@ -549,9 +518,9 @@ def main():
module = AnsibleModule(
argument_spec=dict(
outputfile=dict(required=True),
- host=dict(required=True),
- username=dict(required=True),
- password=dict(required=True, no_log=True),
+ host=dict(required=False),
+ username=dict(required=False),
+ password=dict(required=False, no_log=True),
enablePassword=dict(required=False, no_log=True),
deviceType=dict(required=True),
vlanArg1=dict(required=True),
diff --git a/lib/ansible/modules/network/enos/enos_config.py b/lib/ansible/modules/network/enos/enos_config.py
index a247992870..8dac5b8d37 100644
--- a/lib/ansible/modules/network/enos/enos_config.py
+++ b/lib/ansible/modules/network/enos/enos_config.py
@@ -38,7 +38,7 @@ description:
a deterministic way.
extends_documentation_fragment: enos
notes:
- - Tested against ENOS 8.4.1.2
+ - Tested against ENOS 8.4.1
options:
lines:
description:
diff --git a/lib/ansible/modules/network/enos/enos_facts.py b/lib/ansible/modules/network/enos/enos_facts.py
index 4205656da2..314b24f94d 100644
--- a/lib/ansible/modules/network/enos/enos_facts.py
+++ b/lib/ansible/modules/network/enos/enos_facts.py
@@ -38,7 +38,7 @@ description:
and can enable or disable collection of additional facts.
extends_documentation_fragment: enos
notes:
- - Tested against ENOS 8.4.1.68
+ - Tested against ENOS 8.4.1
options:
gather_subset:
description:
diff --git a/lib/ansible/utils/module_docs_fragments/cnos.py b/lib/ansible/utils/module_docs_fragments/cnos.py
index f200f58d02..91ac4f6e2d 100644
--- a/lib/ansible/utils/module_docs_fragments/cnos.py
+++ b/lib/ansible/utils/module_docs_fragments/cnos.py
@@ -72,8 +72,8 @@ options:
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 choices NE1072T,NE1032,NE1032T,NE10032,NE2572 are added
+ since version 2.4.
required: Yes
choices: [g8272_cnos,g8296_cnos,g8332_cnos,NE1072T,NE1032,
NE1032T,NE10032,NE2572]
diff --git a/test/integration/targets/cnos_ethernet/README.md b/test/integration/targets/cnos_ethernet/README.md
index e3c606ef0a..39e16e3d6b 100644
--- a/test/integration/targets/cnos_ethernet/README.md
+++ b/test/integration/targets/cnos_ethernet/README.md
@@ -117,4 +117,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_image/README.md b/test/integration/targets/cnos_image/README.md
index d3ec1f8a72..cb90f60f80 100644
--- a/test/integration/targets/cnos_image/README.md
+++ b/test/integration/targets/cnos_image/README.md
@@ -116,4 +116,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_rollback/README.md b/test/integration/targets/cnos_rollback/README.md
index 9c877d4c8a..ad06473b51 100644
--- a/test/integration/targets/cnos_rollback/README.md
+++ b/test/integration/targets/cnos_rollback/README.md
@@ -116,4 +116,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_save/README.md b/test/integration/targets/cnos_save/README.md
index f5ded939a4..da2d741692 100644
--- a/test/integration/targets/cnos_save/README.md
+++ b/test/integration/targets/cnos_save/README.md
@@ -93,4 +93,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_showrun/README.md b/test/integration/targets/cnos_showrun/README.md
index c035161e26..114116fc4c 100644
--- a/test/integration/targets/cnos_showrun/README.md
+++ b/test/integration/targets/cnos_showrun/README.md
@@ -93,4 +93,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_template/README.md b/test/integration/targets/cnos_template/README.md
index 4e02756531..f200f96b50 100644
--- a/test/integration/targets/cnos_template/README.md
+++ b/test/integration/targets/cnos_template/README.md
@@ -109,4 +109,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .
diff --git a/test/integration/targets/cnos_vlan/README.md b/test/integration/targets/cnos_vlan/README.md
index 640b6992a2..42cd48ddc7 100644
--- a/test/integration/targets/cnos_vlan/README.md
+++ b/test/integration/targets/cnos_vlan/README.md
@@ -113,4 +113,4 @@ Ansible is free software: you can redistribute it and/or modify it under the ter
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 .
\ No newline at end of file
+You should have received a copy of the GNU General Public License along with Ansible. If not, see .