From d0e89bc1bb999f0e8362e661b4259dde5cd715fd Mon Sep 17 00:00:00 2001 From: Anil Kumar Muraleedharan Date: Thu, 11 Oct 2018 19:19:49 +0530 Subject: [PATCH] Lenovo finetune modules (#46623) * Making username password etc non mandatory as we use persistence connection. Some documentation fine tuning also done. * To update version which was tested against. * Adding Bacon switch (NE0152T) to device rules * Qalthos Review catch * Updating version * Changing documentation to add Bacon switch. This is effective since 2.8 --- .../network/cnos/cnos_devicerules.py | 191 ++++++++++++++++++ .../modules/network/cnos/cnos_backup.py | 26 +-- lib/ansible/modules/network/cnos/cnos_bgp.py | 86 +------- .../network/cnos/cnos_conditional_command.py | 14 +- .../network/cnos/cnos_conditional_template.py | 15 +- .../modules/network/cnos/cnos_config.py | 2 +- .../modules/network/cnos/cnos_factory.py | 12 +- .../modules/network/cnos/cnos_facts.py | 2 +- .../modules/network/cnos/cnos_image.py | 17 +- .../modules/network/cnos/cnos_interface.py | 100 +-------- .../modules/network/cnos/cnos_portchannel.py | 73 +------ .../modules/network/cnos/cnos_reload.py | 13 +- .../modules/network/cnos/cnos_rollback.py | 26 +-- lib/ansible/modules/network/cnos/cnos_save.py | 14 +- .../modules/network/cnos/cnos_showrun.py | 14 +- .../modules/network/cnos/cnos_template.py | 12 +- lib/ansible/modules/network/cnos/cnos_vlag.py | 58 +----- lib/ansible/modules/network/cnos/cnos_vlan.py | 39 +--- .../modules/network/enos/enos_config.py | 2 +- .../modules/network/enos/enos_facts.py | 2 +- .../utils/module_docs_fragments/cnos.py | 6 +- .../integration/targets/cnos_backup/README.md | 2 +- test/integration/targets/cnos_bgp/README.md | 2 +- .../cnos_conditional_command/README.md | 2 +- .../cnos_conditional_template/README.md | 2 +- .../targets/cnos_ethernet/README.md | 2 +- test/integration/targets/cnos_image/README.md | 2 +- .../targets/cnos_portchannel/README.md | 2 +- .../targets/cnos_rollback/README.md | 2 +- test/integration/targets/cnos_save/README.md | 2 +- .../targets/cnos_showrun/README.md | 2 +- .../targets/cnos_template/README.md | 2 +- test/integration/targets/cnos_vlan/README.md | 4 +- 33 files changed, 266 insertions(+), 484 deletions(-) diff --git a/lib/ansible/module_utils/network/cnos/cnos_devicerules.py b/lib/ansible/module_utils/network/cnos/cnos_devicerules.py index c7636f5647e..f6c8f24ea78 100644 --- a/lib/ansible/module_utils/network/cnos/cnos_devicerules.py +++ b/lib/ansible/module_utils/network/cnos/cnos_devicerules.py @@ -73,6 +73,11 @@ def getRuleString(deviceType, variableId): retVal = retVal + NE2572[variableId] else: retVal = "The variable " + variableId + " is not supported" + elif(deviceType == 'NE0152T'): + if variableId in NE0152T: + retVal = retVal + NE0152T[variableId] + else: + retVal = "The variable " + variableId + " is not supported" else: if variableId in default_cnos: retVal = retVal + default_cnos[variableId] @@ -268,6 +273,192 @@ default_cnos = { egress-only', 'vrrp_id': 'INTEGER_VALUE:1-255', } +NE0152T = { + 'vlan_id': 'INTEGER_VALUE:1-3999', + 'vlan_id_range': 'INTEGER_VALUE_RANGE:1-3999', + 'vlan_name': 'TEXT:', + 'vlan_flood': 'TEXT_OPTIONS:ipv4,ipv6', + 'vlan_state': 'TEXT_OPTIONS:active,suspend', + 'vlan_last_member_query_interval': 'INTEGER_VALUE:1-25', + 'vlan_querier': 'IPV4Address:', + 'vlan_querier_timeout': 'INTEGER_VALUE:1-65535', + 'vlan_query_interval': 'INTEGER_VALUE:1-18000', + 'vlan_query_max_response_time': 'INTEGER_VALUE:1-25', + 'vlan_report_suppression': 'INTEGER_VALUE:1-25', + 'vlan_robustness_variable': 'INTEGER_VALUE:1-7', + 'vlan_startup_query_count': 'INTEGER_VALUE:1-10', + 'vlan_startup_query_interval': 'INTEGER_VALUE:1-18000', + 'vlan_snooping_version': 'INTEGER_VALUE:2-3', + 'vlan_access_map_name': 'TEXT: ', + 'vlan_ethernet_interface': 'TEXT:', + 'vlan_portagg_number': 'INTEGER_VALUE:1-4096', + 'vlan_accessmap_action': 'TEXT_OPTIONS:drop,forward,redirect', + 'vlan_dot1q_tag': 'MATCH_TEXT_OR_EMPTY:egress-only', + 'vlan_filter_name': 'TEXT:', + 'vlag_auto_recovery': 'INTEGER_VALUE:240-3600', + 'vlag_config_consistency': 'TEXT_OPTIONS:disable,strict', + 'vlag_instance': 'INTEGER_VALUE:1-64', + 'vlag_port_aggregation': 'INTEGER_VALUE:1-4096', + 'vlag_priority': 'INTEGER_VALUE:0-65535', + 'vlag_startup_delay': 'INTEGER_VALUE:0-3600', + 'vlag_tier_id': 'INTEGER_VALUE:1-512', + 'vlag_hlthchk_options': 'TEXT_OPTIONS:keepalive-attempts,\ + keepalive-interval,peer-ip,retry-interval', + 'vlag_keepalive_attempts': 'INTEGER_VALUE:1-24', + 'vlag_keepalive_interval': 'INTEGER_VALUE:2-300', + 'vlag_retry_interval': 'INTEGER_VALUE:1-300', + 'vlag_peerip': 'IPV4Address:', + 'vlag_peerip_vrf': 'TEXT_OPTIONS:default,management', + 'bgp_as_number': 'NO_VALIDATION:1-4294967295', + 'bgp_address_family': 'TEXT_OPTIONS:ipv4,ipv6', + 'bgp_bgp_local_count': 'INTEGER_VALUE:2-64', + 'cluster_id_as_ip': 'IPV4Address:', + 'cluster_id_as_number': 'NO_VALIDATION:1-4294967295', + 'confederation_identifier': 'INTEGER_VALUE:1-65535', + 'condeferation_peers_as': 'INTEGER_VALUE:1-65535', + 'stalepath_delay_value': 'INTEGER_VALUE:1-3600', + 'maxas_limit_as': 'INTEGER_VALUE:1-2000', + 'neighbor_ipaddress': 'IPV4Address:', + 'neighbor_as': 'NO_VALIDATION:1-4294967295', + 'router_id': 'IPV4Address:', + 'bgp_keepalive_interval': 'INTEGER_VALUE:0-3600', + 'bgp_holdtime': 'INTEGER_VALUE:0-3600', + 'bgp_aggregate_prefix': 'IPV4AddressWithMask:', + 'addrfamily_routemap_name': 'TEXT:', + 'reachability_half_life': 'INTEGER_VALUE:1-45', + 'start_reuse_route_value': 'INTEGER_VALUE:1-20000', + 'start_suppress_route_value': 'INTEGER_VALUE:1-20000', + 'max_duration_to_suppress_route': 'INTEGER_VALUE:1-255', + 'unreachability_halftime_for_penalty': 'INTEGER_VALUE:1-45', + 'distance_external_AS': 'INTEGER_VALUE:1-255', + 'distance_internal_AS': 'INTEGER_VALUE:1-255', + 'distance_local_routes': 'INTEGER_VALUE:1-255', + 'maxpath_option': 'TEXT_OPTIONS:ebgp,ibgp', + 'maxpath_numbers': 'INTEGER_VALUE:2-32', + 'network_ip_prefix_with_mask': 'IPV4AddressWithMask:', + 'network_ip_prefix_value': 'IPV4Address:', + 'network_ip_prefix_mask': 'IPV4Address:', + 'nexthop_crtitical_delay': 'NO_VALIDATION:1-4294967295', + 'nexthop_noncrtitical_delay': 'NO_VALIDATION:1-4294967295', + 'addrfamily_redistribute_option': 'TEXT_OPTIONS:direct,ospf,\ + static', + 'bgp_neighbor_af_occurances': 'INTEGER_VALUE:1-10', + 'bgp_neighbor_af_filtername': 'TEXT:', + 'bgp_neighbor_af_maxprefix': 'INTEGER_VALUE:1-15870', + 'bgp_neighbor_af_prefixname': 'TEXT:', + 'bgp_neighbor_af_routemap': 'TEXT:', + 'bgp_neighbor_address_family': 'TEXT_OPTIONS:ipv4,ipv6', + 'bgp_neighbor_connection_retrytime': 'INTEGER_VALUE:1-65535', + 'bgp_neighbor_description': 'TEXT:', + 'bgp_neighbor_maxhopcount': 'INTEGER_VALUE:1-255', + 'bgp_neighbor_local_as': 'NO_VALIDATION:1-4294967295', + 'bgp_neighbor_maxpeers': 'INTEGER_VALUE:1-96', + 'bgp_neighbor_password': 'TEXT:', + 'bgp_neighbor_timers_Keepalive': 'INTEGER_VALUE:0-3600', + 'bgp_neighbor_timers_holdtime': 'INTEGER_VALUE:0-3600', + 'bgp_neighbor_ttl_hops': 'INTEGER_VALUE:1-254', + 'bgp_neighbor_update_options': 'TEXT_OPTIONS:ethernet,loopback,\ + vlan', + 'bgp_neighbor_update_ethernet': 'TEXT:', + 'bgp_neighbor_update_loopback': 'INTEGER_VALUE:0-7', + 'bgp_neighbor_update_vlan': 'INTEGER_VALUE:1-4094', + 'bgp_neighbor_weight': 'INTEGER_VALUE:0-65535', + 'ethernet_interface_value': 'INTEGER_VALUE:1-52', + 'ethernet_interface_range': 'INTEGER_VALUE_RANGE:1-52', + 'ethernet_interface_string': 'TEXT:', + 'loopback_interface_value': 'INTEGER_VALUE:0-7', + 'mgmt_interface_value': 'INTEGER_VALUE:0-0', + 'vlan_interface_value': 'INTEGER_VALUE:1-4094', + 'portchannel_interface_value': 'INTEGER_VALUE:1-4096', + 'portchannel_interface_range': 'INTEGER_VALUE_RANGE:1-4096', + 'portchannel_interface_string': 'TEXT:', + 'aggregation_group_no': 'INTEGER_VALUE:1-4096', + 'aggregation_group_mode': 'TEXT_OPTIONS:active,on,passive', + 'bfd_options': 'TEXT_OPTIONS:authentication,echo,interval,ipv4,\ + ipv6,neighbor', + 'bfd_interval': 'INTEGER_VALUE:50-999', + 'bfd_minrx': 'INTEGER_VALUE:50-999', + 'bfd_ multiplier': 'INTEGER_VALUE:3-50', + 'bfd_ipv4_options': 'TEXT_OPTIONS:authentication,echo,\ + interval', + 'bfd_auth_options': 'TEXT_OPTIONS:keyed-md5,keyed-sha1,\ + meticulous-keyed-md5,meticulous-keyed-sha1,simple', + 'bfd_key_options': 'TEXT_OPTIONS:key-chain,key-id', + 'bfd_key_chain': 'TEXT:', + 'bfd_key_id': 'INTEGER_VALUE:0-255', + 'bfd_key_name': 'TEXT:', + 'bfd_neighbor_ip': 'TEXT:', + 'bfd_neighbor_options': 'TEXT_OPTIONS:admin-down,multihop,\ + non-persistent', + 'bfd_access_vlan': 'INTEGER_VALUE:1-3999', + 'bfd_bridgeport_mode': 'TEXT_OPTIONS:access,dot1q-tunnel,\ + trunk', + 'trunk_options': 'TEXT_OPTIONS:allowed,native', + 'trunk_vlanid': 'INTEGER_VALUE:1-3999', + 'portCh_description': 'TEXT:', + 'duplex_option': 'TEXT_OPTIONS:auto,full,half', + 'flowcontrol_options': 'TEXT_OPTIONS:receive,send', + 'portchannel_ip_options': 'TEXT_OPTIONS:access-group,address,\ + arp,dhcp,ospf,port,port-unreachable,redirects,router,\ + unreachables', + 'accessgroup_name': 'TEXT:', + 'portchannel_ipv4': 'IPV4Address:', + 'portchannel_ipv4_mask': 'TEXT:', + 'arp_ipaddress': 'IPV4Address:', + 'arp_macaddress': 'TEXT:', + 'arp_timeout_value': 'INTEGER_VALUE:60-28800', + 'relay_ipaddress': 'IPV4Address:', + 'ip_ospf_options': 'TEXT_OPTIONS:authentication,\ + authentication-key,bfd,cost,database-filter,dead-interval,\ + hello-interval,message-digest-key,mtu,mtu-ignore,network,\ + passive-interface,priority,retransmit-interval,shutdown,\ + transmit-delay', + 'ospf_id_decimal_value': 'NO_VALIDATION:1-4294967295', + 'ospf_id_ipaddres_value': 'IPV4Address:', + 'lacp_options': 'TEXT_OPTIONS:port-priority,suspend-individual,\ + timeout', + 'port_priority': 'INTEGER_VALUE:1-65535', + 'lldp_options': 'TEXT_OPTIONS:receive,tlv-select,transmit,\ + trap-notification', + 'lldp_tlv_options': 'TEXT_OPTIONS:link-aggregation,\ + mac-phy-status,management-address,max-frame-size,\ + port-description,port-protocol-vlan,port-vlan,power-mdi,\ + protocol-identity,system-capabilities,system-description,\ + system-name,vid-management,vlan-name', + 'load_interval_delay': 'INTEGER_VALUE:30-300', + 'load_interval_counter': 'INTEGER_VALUE:1-3', + 'mac_accessgroup_name': 'TEXT:', + 'mac_address': 'TEXT:', + 'microburst_threshold': 'NO_VALIDATION:1-4294967295', + 'mtu_value': 'INTEGER_VALUE:64-9216', + 'service_instance': 'NO_VALIDATION:1-4294967295', + 'service_policy_options': 'TEXT_OPTIONS:copp-system-policy,\ + input,output,type', + 'service_policy_name': 'TEXT:', + 'spanning_tree_options': 'TEXT_OPTIONS:bpdufilter,bpduguard,\ + cost,disable,enable,guard,link-type,mst,port,port-priority,\ + vlan', + 'spanning_tree_cost': 'NO_VALIDATION:1-200000000', + 'spanning_tree_interfacerange': 'INTEGER_VALUE_RANGE:1-3999', + 'spanning_tree_portpriority': 'TEXT_OPTIONS:0,32,64,96,128,160,\ + 192,224', + 'portchannel_ipv6_neighbor_mac': 'TEXT:', + 'portchannel_ipv6_neighbor_address': 'IPV6Address:', + 'portchannel_ipv6_linklocal': 'IPV6Address:', + 'portchannel_ipv6_dhcp_vlan': 'INTEGER_VALUE:1-4094', + 'portchannel_ipv6_dhcp_ethernet': 'TEXT:', + 'portchannel_ipv6_dhcp': 'IPV6Address:', + 'portchannel_ipv6_address': 'IPV6Address:', + 'portchannel_ipv6_options': 'TEXT_OPTIONS:address,dhcp,\ + link-local,nd,neighbor', + 'interface_speed': 'TEXT_OPTIONS:10,100,1000,10000,auto', + 'stormcontrol_options': 'TEXT_OPTIONS:broadcast,multicast,\ + unicast', + 'stormcontrol_level': 'FLOAT:', + 'portchannel_dot1q_tag': 'TEXT_OPTIONS:disable,enable,\ + egress-only', + 'vrrp_id': 'INTEGER_VALUE:1-255', +} NE2572 = { 'vlan_id': 'INTEGER_VALUE:1-3999', 'vlan_id_range': 'INTEGER_VALUE_RANGE:1-3999', diff --git a/lib/ansible/modules/network/cnos/cnos_backup.py b/lib/ansible/modules/network/cnos/cnos_backup.py index 1fae9eeb632..6088ccd8767 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 726acf52d4b..6a100f7785a 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 dd01ece2ee4..52233260a4c 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 8a70a7a80d3..6407fecbb37 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 8e63b3f8e9c..a6467aa1920 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 ee6a9f1ec5b..dd1cda3737a 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 034fdd024ce..46fdfc28da1 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 ccc07caaad0..d7da989cd80 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 a0a93860517..c84b400a4df 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 275173d9722..c6554081a73 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 1e0319552a1..7f0975906d1 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 34bd8b9309a..2191ff1624b 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 97e3c5deb19..3a29be9d542 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 78bf5538f60..35546d555d1 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 86962da75b3..854bc5a3db8 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 c7d34f11e6a..b8b4729606a 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 258ad03d4a1..a92d13a3fa6 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 a2479928706..8dac5b8d378 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 4205656da2e..314b24f94dc 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 f200f58d025..3f41a2c564e 100644 --- a/lib/ansible/utils/module_docs_fragments/cnos.py +++ b/lib/ansible/utils/module_docs_fragments/cnos.py @@ -72,11 +72,11 @@ 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. The choice NE0152T is added since 2.8 required: Yes choices: [g8272_cnos,g8296_cnos,g8332_cnos,NE1072T,NE1032, - NE1032T,NE10032,NE2572] + NE1032T,NE10032,NE2572,NE0152T] version_added: 2.3 notes: - For more information on using Ansible to manage Lenovo Network devices see U(https://www.ansible.com/ansible-lenovo). diff --git a/test/integration/targets/cnos_backup/README.md b/test/integration/targets/cnos_backup/README.md index d2f161f4edc..b94ca8334c8 100644 --- a/test/integration/targets/cnos_backup/README.md +++ b/test/integration/targets/cnos_backup/README.md @@ -34,7 +34,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_bgp/README.md b/test/integration/targets/cnos_bgp/README.md index 678720bed60..a308cb69203 100644 --- a/test/integration/targets/cnos_bgp/README.md +++ b/test/integration/targets/cnos_bgp/README.md @@ -36,7 +36,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_conditional_command/README.md b/test/integration/targets/cnos_conditional_command/README.md index 4663322df64..bacf85d6859 100644 --- a/test/integration/targets/cnos_conditional_command/README.md +++ b/test/integration/targets/cnos_conditional_command/README.md @@ -41,7 +41,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) `condition` | If `condition=false` is specified in the inventory file against any device, the command execution is skipped for that device (**true**, **false**) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_conditional_template/README.md b/test/integration/targets/cnos_conditional_template/README.md index c3f40dd8982..dfc157d030b 100644 --- a/test/integration/targets/cnos_conditional_template/README.md +++ b/test/integration/targets/cnos_conditional_template/README.md @@ -42,7 +42,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) `condition` | If `condition=` is specified in the inventory file against any device, the template execution is done for that device in case it matches the flag setting for that task The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_ethernet/README.md b/test/integration/targets/cnos_ethernet/README.md index e3c606ef0a8..ec5c1b34996 100644 --- a/test/integration/targets/cnos_ethernet/README.md +++ b/test/integration/targets/cnos_ethernet/README.md @@ -36,7 +36,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_image/README.md b/test/integration/targets/cnos_image/README.md index d3ec1f8a722..1bebf03d382 100644 --- a/test/integration/targets/cnos_image/README.md +++ b/test/integration/targets/cnos_image/README.md @@ -38,7 +38,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_portchannel/README.md b/test/integration/targets/cnos_portchannel/README.md index 65dcf52e2ae..428f5569629 100644 --- a/test/integration/targets/cnos_portchannel/README.md +++ b/test/integration/targets/cnos_portchannel/README.md @@ -36,7 +36,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_rollback/README.md b/test/integration/targets/cnos_rollback/README.md index 9c877d4c8ac..20a5392d8af 100644 --- a/test/integration/targets/cnos_rollback/README.md +++ b/test/integration/targets/cnos_rollback/README.md @@ -38,7 +38,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_save/README.md b/test/integration/targets/cnos_save/README.md index f5ded939a49..821ed4d86ee 100644 --- a/test/integration/targets/cnos_save/README.md +++ b/test/integration/targets/cnos_save/README.md @@ -34,7 +34,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) ## Dependencies diff --git a/test/integration/targets/cnos_showrun/README.md b/test/integration/targets/cnos_showrun/README.md index c035161e263..b1976b3b0d3 100644 --- a/test/integration/targets/cnos_showrun/README.md +++ b/test/integration/targets/cnos_showrun/README.md @@ -34,7 +34,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) ## Dependencies diff --git a/test/integration/targets/cnos_template/README.md b/test/integration/targets/cnos_template/README.md index 4e027565311..aa154a25399 100644 --- a/test/integration/targets/cnos_template/README.md +++ b/test/integration/targets/cnos_template/README.md @@ -36,7 +36,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up(**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up(**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. diff --git a/test/integration/targets/cnos_vlan/README.md b/test/integration/targets/cnos_vlan/README.md index 640b6992a23..9316591d0d1 100644 --- a/test/integration/targets/cnos_vlan/README.md +++ b/test/integration/targets/cnos_vlan/README.md @@ -36,7 +36,7 @@ Variable | Description `ansible_ssh_pass` | Specifies the password used to log into the switch `enablePassword` | Configures the password used to enter Global Configuration command mode on the switch (this is an optional parameter) `hostname` | Searches the hosts file at */etc/ansible/hosts* and identifies the IP address of the switch on which the role is going to be applied -`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572) +`deviceType` | Specifies the type of device from where the configuration will be backed up (**g8272_cnos** - G8272, **g8296_cnos** - G8296, **g8332_cnos** - G8332, **NE10032** - NE10032, **NE1072T** - NE1072T, **NE1032** - NE1032, **NE1032T** - NE1032T, **NE2572** - NE2572, **NE0152T** - NE0152T) The values of the variables used need to be modified to fit the specific scenario in which you are deploying the solution. To change the values of the variables, you need to visits the *vars* directory of each role and edit the *main.yml* file located there. The values stored in this file will be used by Ansible when the template is executed. @@ -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 .