summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcontrib/inventory/apache-libcloud.py1
-rwxr-xr-xcontrib/inventory/apstra_aos.py1
-rwxr-xr-xcontrib/inventory/cloudforms.py1
-rwxr-xr-xcontrib/inventory/cobbler.py1
-rwxr-xr-xcontrib/inventory/consul_io.py1
-rwxr-xr-xcontrib/inventory/docker.py1
-rwxr-xr-xcontrib/inventory/foreman.py1
-rwxr-xr-xcontrib/inventory/gce.py1
-rwxr-xr-xcontrib/inventory/lxc_inventory.py1
-rwxr-xr-xcontrib/inventory/mdt_dynamic_inventory.py1
-rwxr-xr-xcontrib/inventory/nagios_livestatus.py1
-rwxr-xr-xcontrib/inventory/nagios_ndo.py1
-rwxr-xr-xcontrib/inventory/nsot.py1
-rwxr-xr-xcontrib/inventory/ovirt.py1
-rwxr-xr-xcontrib/inventory/ovirt4.py1
-rwxr-xr-xcontrib/inventory/rax.py2
-rwxr-xr-xcontrib/inventory/rudder.py1
-rwxr-xr-xcontrib/inventory/softlayer.py1
-rwxr-xr-xcontrib/inventory/vbox.py1
-rwxr-xr-xcontrib/inventory/zabbix.py1
-rwxr-xr-xexamples/scripts/uptime.py1
-rwxr-xr-xhacking/get_library.py1
-rw-r--r--lib/ansible/compat/selectors/_selectors2.py2
-rw-r--r--lib/ansible/module_utils/database.py1
-rw-r--r--lib/ansible/module_utils/k8s/common.py1
-rw-r--r--lib/ansible/module_utils/network/aci/aci.py1
-rw-r--r--lib/ansible/module_utils/network/cnos/cnos_devicerules.py1
-rw-r--r--lib/ansible/module_utils/pycompat24.py1
-rw-r--r--lib/ansible/module_utils/six/__init__.py2
-rw-r--r--lib/ansible/module_utils/urls.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/aws_glue_connection.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/aws_glue_job.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/aws_s3_cors.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/elasticache.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/elb_application_lb.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/elb_network_lb.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/elb_target.py1
-rw-r--r--lib/ansible/modules/cloud/amazon/route53_health_check.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_dnszone.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_functionapp.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_image.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_keyvault.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_keyvaultkey.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_keyvaultsecret.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_publicipaddress.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_securitygroup_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_sqldatabase.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_sqlserver_facts.py2
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_storageblob.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_subnet.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py1
-rw-r--r--lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py1
-rw-r--r--lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_address.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_backend_service.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_disk.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_firewall.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_global_address.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_health_check.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_image.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_instance.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_instance_group.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_instance_template.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_network.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_route.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_pool.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_compute_url_map.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_container_cluster.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_container_node_pool.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_pubsub_topic.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_storage_bucket.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py1
-rw-r--r--lib/ansible/modules/cloud/google/gcpubsub.py1
-rw-r--r--lib/ansible/modules/cloud/opennebula/one_image_facts.py1
-rw-r--r--lib/ansible/modules/cloud/opennebula/one_vm.py2
-rw-r--r--lib/ansible/modules/cloud/ovirt/ovirt_nics.py1
-rw-r--r--lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py1
-rw-r--r--lib/ansible/modules/cloud/packet/packet_device.py1
-rw-r--r--lib/ansible/modules/cloud/smartos/smartos_image_facts.py1
-rw-r--r--lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py1
-rw-r--r--lib/ansible/modules/cloud/vmware/vmware_local_user_facts.py1
-rw-r--r--lib/ansible/modules/clustering/etcd3.py1
-rw-r--r--lib/ansible/modules/database/postgresql/postgresql_db.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_backend_servers.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_global_variables.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_manage_config.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_mysql_users.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_query_rules.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py1
-rw-r--r--lib/ansible/modules/database/proxysql/proxysql_scheduler.py1
-rw-r--r--lib/ansible/modules/files/assemble.py1
-rw-r--r--lib/ansible/modules/files/ini_file.py1
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_service.py1
-rw-r--r--lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py1
-rw-r--r--lib/ansible/modules/identity/keycloak/keycloak_client.py1
-rw-r--r--lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py1
-rw-r--r--lib/ansible/modules/identity/opendj/opendj_backendprop.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_exchange.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_parameter.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_policy.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_queue.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_user.py1
-rw-r--r--lib/ansible/modules/messaging/rabbitmq_vhost.py1
-rw-r--r--lib/ansible/modules/monitoring/grafana_dashboard.py1
-rw-r--r--lib/ansible/modules/monitoring/grafana_datasource.py1
-rw-r--r--lib/ansible/modules/monitoring/grafana_plugin.py1
-rw-r--r--lib/ansible/modules/monitoring/sensu_client.py1
-rw-r--r--lib/ansible/modules/monitoring/sensu_handler.py1
-rw-r--r--lib/ansible/modules/monitoring/zabbix/zabbix_group_facts.py1
-rw-r--r--lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py1
-rw-r--r--lib/ansible/modules/network/a10/a10_service_group.py1
-rw-r--r--lib/ansible/modules/network/aci/aci_aep.py1
-rw-r--r--lib/ansible/modules/network/aci/aci_contract_subject.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_asn_pool.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_device.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_external_router.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_ip_pool.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_logical_device.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_logical_device_map.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_login.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_rack_type.py1
-rw-r--r--lib/ansible/modules/network/aos/_aos_template.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_actiongroupconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_alertconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_alertemailconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_alertscriptconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_alertsyslogconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_analyticsprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_api_version.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_applicationprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_authprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_autoscalelaunchconfig.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_backup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_backupconfiguration.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_cloud.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_cloudconnectoruser.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_cloudproperties.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_cluster.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_clusterclouddetails.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_controllerproperties.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_customipamdnsprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_dnspolicy.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_errorpagebody.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_errorpageprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_gslb.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_gslbservice.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_hardwaresecuritymodulegroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_healthmonitor.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_httppolicyset.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_ipaddrgroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_l4policyset.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_microservicegroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_network.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_networkprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_networksecuritypolicy.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_pkiprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_pool.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_poolgroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_poolgroupdeploymentpolicy.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_prioritylabels.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_role.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_scheduler.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_seproperties.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_serverautoscalepolicy.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_serviceengine.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_serviceenginegroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_snmptrapprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_sslkeyandcertificate.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_sslprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_stringgroup.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_systemconfiguration.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_tenant.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_trafficcloneprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_useraccountprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_virtualservice.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_vrfcontext.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_vsdatascriptset.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_vsvip.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_wafpolicy.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_wafprofile.py1
-rw-r--r--lib/ansible/modules/network/avi/avi_webhook.py1
-rw-r--r--lib/ansible/modules/network/bigswitch/bigmon_policy.py1
-rw-r--r--lib/ansible/modules/network/cloudengine/ce_vrf_interface.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_conditional_command.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_conditional_template.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_factory.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_facts.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_image.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_portchannel.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_reload.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_rollback.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_save.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_showrun.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_template.py1
-rw-r--r--lib/ansible/modules/network/cnos/cnos_vlan.py1
-rw-r--r--lib/ansible/modules/network/dellos9/dellos9_config.py1
-rw-r--r--lib/ansible/modules/network/enos/enos_facts.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_banner.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_linkagg.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_lldp.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_static_route.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_system.py1
-rw-r--r--lib/ansible/modules/network/eos/eos_user.py1
-rw-r--r--lib/ansible/modules/network/f5/bigip_asm_policy.py1
-rw-r--r--lib/ansible/modules/network/f5/bigip_gtm_server.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_banner.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_config.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_interface.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_linkagg.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_system.py1
-rw-r--r--lib/ansible/modules/network/ios/ios_user.py1
-rw-r--r--lib/ansible/modules/network/iosxr/iosxr_command.py1
-rw-r--r--lib/ansible/modules/network/iosxr/iosxr_logging.py1
-rw-r--r--lib/ansible/modules/network/iosxr/iosxr_user.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_banner.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_command.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_interface.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_l3_interface.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_linkagg.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_lldp_interface.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_logging.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_static_route.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_system.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_user.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_vlan.py1
-rw-r--r--lib/ansible/modules/network/junos/junos_vrf.py1
-rw-r--r--lib/ansible/modules/network/netconf/netconf_get.py1
-rw-r--r--lib/ansible/modules/network/netconf/netconf_rpc.py1
-rw-r--r--lib/ansible/modules/network/netvisor/pn_cluster.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_ospf.py6
-rw-r--r--lib/ansible/modules/network/netvisor/pn_ospfarea.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_show.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_trunk.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vlag.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vlan.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vrouter.py5
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vrouterbgp.py6
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vrouterif.py6
-rw-r--r--lib/ansible/modules/network/netvisor/pn_vrouterlbif.py5
-rw-r--r--lib/ansible/modules/network/nxos/nxos_file_copy.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_igmp_snooping.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_l3_interface.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_linkagg.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_ntp_auth.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_nxapi.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_reboot.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_snapshot.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_static_route.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_system.py1
-rw-r--r--lib/ansible/modules/network/nxos/nxos_user.py1
-rw-r--r--lib/ansible/modules/network/ordnance/ordnance_facts.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_admin.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_admpwd.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_check.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_commit.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_dag.py1
-rw-r--r--lib/ansible/modules/network/panos/panos_lic.py1
-rw-r--r--lib/ansible/modules/network/radware/vdirect_commit.py1
-rw-r--r--lib/ansible/modules/network/radware/vdirect_file.py1
-rw-r--r--lib/ansible/modules/network/radware/vdirect_runnable.py1
-rw-r--r--lib/ansible/modules/network/slxos/slxos_vlan.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_banner.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_interface.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_l3_interface.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_linkagg.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_lldp.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_lldp_interface.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_logging.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_static_route.py1
-rw-r--r--lib/ansible/modules/network/vyos/vyos_user.py1
-rw-r--r--lib/ansible/modules/notification/snow_record.py1
-rw-r--r--lib/ansible/modules/notification/syslogger.py1
-rw-r--r--lib/ansible/modules/packaging/language/maven_artifact.py1
-rw-r--r--lib/ansible/modules/packaging/os/apt_rpm.py1
-rw-r--r--lib/ansible/modules/packaging/os/openbsd_pkg.py1
-rw-r--r--lib/ansible/modules/packaging/os/zypper.py6
-rw-r--r--lib/ansible/modules/remote_management/hpilo/hpilo_facts.py1
-rw-r--r--lib/ansible/modules/remote_management/imc/imc_rest.py1
-rw-r--r--lib/ansible/modules/remote_management/ipmi/ipmi_boot.py1
-rw-r--r--lib/ansible/modules/remote_management/ipmi/ipmi_power.py1
-rw-r--r--lib/ansible/modules/remote_management/redfish/redfish_facts.py1
-rw-r--r--lib/ansible/modules/source_control/gitlab_deploy_key.py1
-rw-r--r--lib/ansible/modules/source_control/gitlab_hooks.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_cdot_license.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_cdot_svm.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_cdot_user.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_cdot_user_role.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_cdot_volume.py1
-rw-r--r--lib/ansible/modules/storage/netapp/na_ontap_broadcast_domain.py1
-rw-r--r--lib/ansible/modules/storage/netapp/sf_account_manager.py1
-rw-r--r--lib/ansible/modules/storage/netapp/sf_check_connections.py1
-rw-r--r--lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py1
-rw-r--r--lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py1
-rw-r--r--lib/ansible/modules/storage/purestorage/purefa_ds.py1
-rw-r--r--lib/ansible/modules/storage/purestorage/purefa_facts.py1
-rw-r--r--lib/ansible/modules/storage/purestorage/purefa_hg.py1
-rw-r--r--lib/ansible/modules/system/aix_inittab.py1
-rw-r--r--lib/ansible/modules/system/alternatives.py1
-rw-r--r--lib/ansible/modules/system/awall.py2
-rw-r--r--lib/ansible/modules/system/dconf.py1
-rw-r--r--lib/ansible/modules/system/nosh.py1
-rw-r--r--lib/ansible/modules/system/pamd.py1
-rw-r--r--lib/ansible/modules/system/vdo.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/apache2_module.py6
-rw-r--r--lib/ansible/modules/web_infrastructure/gunicorn.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/jboss.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/jira.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py1
-rw-r--r--lib/ansible/modules/web_infrastructure/supervisorctl.py1
-rw-r--r--lib/ansible/parsing/yaml/dumper.py1
-rw-r--r--lib/ansible/plugins/callback/dense.py1
-rw-r--r--lib/ansible/plugins/filter/ipaddr.py1
-rw-r--r--lib/ansible/plugins/inventory/scaleway.py1
-rw-r--r--lib/ansible/utils/hashing.py1
-rw-r--r--packaging/release/versionhelper/version_helper.py1
-rw-r--r--test/integration/targets/async/library/async_test.py1
-rw-r--r--test/integration/targets/async_fail/library/async_test.py1
-rwxr-xr-xtest/integration/targets/var_precedence/ansible-var-precedence-check.py1
-rw-r--r--test/legacy/cleanup_gce.py1
-rw-r--r--test/units/module_utils/network/aci/test_aci.py1
-rw-r--r--test/units/module_utils/network/common/test_parsing.py1
-rw-r--r--test/units/modules/network/nxos/nxos_module.py1
-rw-r--r--test/units/plugins/connection/test_connection.py1
-rw-r--r--test/units/plugins/connection/test_netconf.py1
373 files changed, 408 insertions, 28 deletions
diff --git a/contrib/inventory/apache-libcloud.py b/contrib/inventory/apache-libcloud.py
index 7d6bba2515..067076fdf5 100755
--- a/contrib/inventory/apache-libcloud.py
+++ b/contrib/inventory/apache-libcloud.py
@@ -344,5 +344,6 @@ class LibcloudInventory(object):
def main():
LibcloudInventory()
+
if __name__ == '__main__':
main()
diff --git a/contrib/inventory/apstra_aos.py b/contrib/inventory/apstra_aos.py
index 2ffd3290f0..c793f29aad 100755
--- a/contrib/inventory/apstra_aos.py
+++ b/contrib/inventory/apstra_aos.py
@@ -583,6 +583,7 @@ class AosInventory(object):
for key, value in device.value['status'].items():
self.add_var_to_host(device.name, key, value)
+
# Run the script
if __name__ == '__main__':
AosInventory()
diff --git a/contrib/inventory/cloudforms.py b/contrib/inventory/cloudforms.py
index c6702dcce1..64c300cab8 100755
--- a/contrib/inventory/cloudforms.py
+++ b/contrib/inventory/cloudforms.py
@@ -482,4 +482,5 @@ class CloudFormsInventory(object):
else:
return json.dumps(data)
+
CloudFormsInventory()
diff --git a/contrib/inventory/cobbler.py b/contrib/inventory/cobbler.py
index 2762041dc9..87e855faa5 100755
--- a/contrib/inventory/cobbler.py
+++ b/contrib/inventory/cobbler.py
@@ -312,4 +312,5 @@ class CobblerInventory(object):
else:
return json.dumps(data)
+
CobblerInventory()
diff --git a/contrib/inventory/consul_io.py b/contrib/inventory/consul_io.py
index b7197291fd..57bad6f934 100755
--- a/contrib/inventory/consul_io.py
+++ b/contrib/inventory/consul_io.py
@@ -528,4 +528,5 @@ class ConsulConfig(dict):
token = 'anonymous'
return consul.Consul(host=host, port=port, token=token, scheme=scheme)
+
ConsulInventory()
diff --git a/contrib/inventory/docker.py b/contrib/inventory/docker.py
index 9a41ebe3d4..9e344828b3 100755
--- a/contrib/inventory/docker.py
+++ b/contrib/inventory/docker.py
@@ -889,4 +889,5 @@ def main():
DockerInventory().run()
+
main()
diff --git a/contrib/inventory/foreman.py b/contrib/inventory/foreman.py
index fe82c059bd..99200168f6 100755
--- a/contrib/inventory/foreman.py
+++ b/contrib/inventory/foreman.py
@@ -436,5 +436,6 @@ class ForemanInventory(object):
self._print_data()
return True
+
if __name__ == '__main__':
sys.exit(not ForemanInventory().run())
diff --git a/contrib/inventory/gce.py b/contrib/inventory/gce.py
index e72f343e36..5c5773e0aa 100755
--- a/contrib/inventory/gce.py
+++ b/contrib/inventory/gce.py
@@ -534,6 +534,7 @@ class GceInventory(object):
else:
return json.dumps(data)
+
# Run the script
if __name__ == '__main__':
GceInventory()
diff --git a/contrib/inventory/lxc_inventory.py b/contrib/inventory/lxc_inventory.py
index c026c20009..86a6b22c2d 100755
--- a/contrib/inventory/lxc_inventory.py
+++ b/contrib/inventory/lxc_inventory.py
@@ -65,5 +65,6 @@ def main(argv):
else:
print("Need an argument, either --list or --host <host>", file=sys.stderr)
+
if __name__ == '__main__':
main(sys.argv)
diff --git a/contrib/inventory/mdt_dynamic_inventory.py b/contrib/inventory/mdt_dynamic_inventory.py
index 958414f372..947091079a 100755
--- a/contrib/inventory/mdt_dynamic_inventory.py
+++ b/contrib/inventory/mdt_dynamic_inventory.py
@@ -129,6 +129,7 @@ class MDTInventory(object):
parser.add_argument('--host', action='store', help='Get all the variables about a specific instance')
self.args = parser.parse_args()
+
if __name__ == "__main__":
# Run the script
MDTInventory()
diff --git a/contrib/inventory/nagios_livestatus.py b/contrib/inventory/nagios_livestatus.py
index 91c72dac60..8f428000d8 100755
--- a/contrib/inventory/nagios_livestatus.py
+++ b/contrib/inventory/nagios_livestatus.py
@@ -173,4 +173,5 @@ class NagiosLivestatusInventory(object):
else:
sys.exit("usage: --list or --host HOSTNAME [--pretty]")
+
NagiosLivestatusInventory()
diff --git a/contrib/inventory/nagios_ndo.py b/contrib/inventory/nagios_ndo.py
index e5377119c7..a4477e1e26 100755
--- a/contrib/inventory/nagios_ndo.py
+++ b/contrib/inventory/nagios_ndo.py
@@ -105,4 +105,5 @@ class NagiosNDOInventory(object):
else:
sys.exit("Error: Database configuration is missing. See nagios_ndo.ini.")
+
NagiosNDOInventory()
diff --git a/contrib/inventory/nsot.py b/contrib/inventory/nsot.py
index 1c4b474362..d7fca297ba 100755
--- a/contrib/inventory/nsot.py
+++ b/contrib/inventory/nsot.py
@@ -339,5 +339,6 @@ def main():
elif args.host:
print(client.do_host(args.host))
+
if __name__ == '__main__':
main()
diff --git a/contrib/inventory/ovirt.py b/contrib/inventory/ovirt.py
index 6ea355198c..9ac85aae79 100755
--- a/contrib/inventory/ovirt.py
+++ b/contrib/inventory/ovirt.py
@@ -288,5 +288,6 @@ class OVirtInventory(object):
else:
return json.dumps(data)
+
# Run the script
OVirtInventory()
diff --git a/contrib/inventory/ovirt4.py b/contrib/inventory/ovirt4.py
index cf2f7ad3c9..33fb5b3a8a 100755
--- a/contrib/inventory/ovirt4.py
+++ b/contrib/inventory/ovirt4.py
@@ -258,5 +258,6 @@ def main():
)
)
+
if __name__ == '__main__':
main()
diff --git a/contrib/inventory/rax.py b/contrib/inventory/rax.py
index 0d0c7b63fd..1e66d28b14 100755
--- a/contrib/inventory/rax.py
+++ b/contrib/inventory/rax.py
@@ -185,7 +185,6 @@ def load_config_file():
return None
else:
return p
-p = load_config_file()
def rax_slugify(value):
@@ -469,5 +468,6 @@ def main():
sys.exit(0)
+p = load_config_file()
if __name__ == '__main__':
main()
diff --git a/contrib/inventory/rudder.py b/contrib/inventory/rudder.py
index 30cab1a21d..4e2a119152 100755
--- a/contrib/inventory/rudder.py
+++ b/contrib/inventory/rudder.py
@@ -294,5 +294,6 @@ class RudderInventory(object):
return re.sub(r'[^A-Za-z0-9\_]', '_', word)
+
# Run the script
RudderInventory()
diff --git a/contrib/inventory/softlayer.py b/contrib/inventory/softlayer.py
index bddb0db6f9..d53b6fa26d 100755
--- a/contrib/inventory/softlayer.py
+++ b/contrib/inventory/softlayer.py
@@ -198,4 +198,5 @@ class SoftLayerInventory(object):
self.get_virtual_servers()
self.get_physical_servers()
+
SoftLayerInventory()
diff --git a/contrib/inventory/vbox.py b/contrib/inventory/vbox.py
index 6326dad3fe..61ecf2826a 100755
--- a/contrib/inventory/vbox.py
+++ b/contrib/inventory/vbox.py
@@ -30,6 +30,7 @@ class SetEncoder(json.JSONEncoder):
return list(obj)
return json.JSONEncoder.default(self, obj)
+
VBOX = "VBoxManage"
diff --git a/contrib/inventory/zabbix.py b/contrib/inventory/zabbix.py
index 48b3017194..0f57bff14f 100755
--- a/contrib/inventory/zabbix.py
+++ b/contrib/inventory/zabbix.py
@@ -152,4 +152,5 @@ class ZabbixInventory(object):
print("Error: Configuration of server and credentials are required. See zabbix.ini.", file=sys.stderr)
sys.exit(1)
+
ZabbixInventory()
diff --git a/examples/scripts/uptime.py b/examples/scripts/uptime.py
index 4d3d96c32f..deef4481b2 100755
--- a/examples/scripts/uptime.py
+++ b/examples/scripts/uptime.py
@@ -92,5 +92,6 @@ def main():
for host, result in callback.host_unreachable.items():
print('{0} >>> {1}'.format(host, result._result['msg']))
+
if __name__ == '__main__':
main()
diff --git a/hacking/get_library.py b/hacking/get_library.py
index 121e2dc2e9..ea5d44bf3d 100755
--- a/hacking/get_library.py
+++ b/hacking/get_library.py
@@ -26,5 +26,6 @@ def main():
print(C.DEFAULT_MODULE_PATH)
return 0
+
if __name__ == '__main__':
sys.exit(main())
diff --git a/lib/ansible/compat/selectors/_selectors2.py b/lib/ansible/compat/selectors/_selectors2.py
index a97b59e663..c4c81d76d4 100644
--- a/lib/ansible/compat/selectors/_selectors2.py
+++ b/lib/ansible/compat/selectors/_selectors2.py
@@ -77,6 +77,7 @@ def _fileobj_to_fd(fileobj):
raise ValueError("Invalid file descriptor: {0}".format(fd))
return fd
+
# Python 3.5 uses a more direct route to wrap system calls to increase speed.
if sys.version_info >= (3, 5):
def _syscall_wrapper(func, _, *args, **kwargs):
@@ -305,6 +306,7 @@ class BaseSelector(object):
def __exit__(self, *args):
self.close()
+
# Almost all platforms have select.select()
if hasattr(select, "select"):
class SelectSelector(BaseSelector):
diff --git a/lib/ansible/module_utils/database.py b/lib/ansible/module_utils/database.py
index 701c8bdc0b..83f28c0e3a 100644
--- a/lib/ansible/module_utils/database.py
+++ b/lib/ansible/module_utils/database.py
@@ -34,6 +34,7 @@ class SQLParseError(Exception):
class UnclosedQuoteError(SQLParseError):
pass
+
# maps a type of identifier to the maximum number of dot levels that are
# allowed to specify that identifier. For example, a database column can be
# specified by up to 4 levels: database.schema.table.column
diff --git a/lib/ansible/module_utils/k8s/common.py b/lib/ansible/module_utils/k8s/common.py
index 300b55d0a8..edb8fa3aab 100644
--- a/lib/ansible/module_utils/k8s/common.py
+++ b/lib/ansible/module_utils/k8s/common.py
@@ -61,6 +61,7 @@ def list_dict_str(value):
return value
raise TypeError
+
ARG_ATTRIBUTES_BLACKLIST = ('property_path',)
COMMON_ARG_SPEC = {
diff --git a/lib/ansible/module_utils/network/aci/aci.py b/lib/ansible/module_utils/network/aci/aci.py
index e6aeebef51..2a0608b2ef 100644
--- a/lib/ansible/module_utils/network/aci/aci.py
+++ b/lib/ansible/module_utils/network/aci/aci.py
@@ -77,6 +77,7 @@ def aci_argument_spec():
validate_certs=dict(type='bool', default=True),
)
+
'''
URL_MAPPING = dict(
action_rule=dict(aci_class='rtctrlAttrP', mo='attr-', key='name'),
diff --git a/lib/ansible/module_utils/network/cnos/cnos_devicerules.py b/lib/ansible/module_utils/network/cnos/cnos_devicerules.py
index 732394eaa6..c7636f5647 100644
--- a/lib/ansible/module_utils/network/cnos/cnos_devicerules.py
+++ b/lib/ansible/module_utils/network/cnos/cnos_devicerules.py
@@ -81,6 +81,7 @@ def getRuleString(deviceType, variableId):
return retVal
# EOM
+
default_cnos = {
'vlan_id': 'INTEGER_VALUE:1-3999',
'vlan_id_range': 'INTEGER_VALUE_RANGE:1-3999',
diff --git a/lib/ansible/module_utils/pycompat24.py b/lib/ansible/module_utils/pycompat24.py
index 53e8397868..bcdf53aec5 100644
--- a/lib/ansible/module_utils/pycompat24.py
+++ b/lib/ansible/module_utils/pycompat24.py
@@ -43,6 +43,7 @@ def get_exception():
"""
return sys.exc_info()[1]
+
try:
# Python 2.6+
from ast import literal_eval
diff --git a/lib/ansible/module_utils/six/__init__.py b/lib/ansible/module_utils/six/__init__.py
index cd305de225..4bc670a645 100644
--- a/lib/ansible/module_utils/six/__init__.py
+++ b/lib/ansible/module_utils/six/__init__.py
@@ -228,6 +228,7 @@ class _SixMetaPathImporter(object):
return None
get_source = get_code # same as get_code
+
_importer = _SixMetaPathImporter(__name__)
@@ -490,6 +491,7 @@ class Module_six_moves_urllib(types.ModuleType):
def __dir__(self):
return ['parse', 'error', 'request', 'response', 'robotparser']
+
_importer._add_module(Module_six_moves_urllib(__name__ + ".moves.urllib"),
"moves.urllib")
diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py
index 25dc35504e..4c145b4d69 100644
--- a/lib/ansible/module_utils/urls.py
+++ b/lib/ansible/module_utils/urls.py
@@ -295,6 +295,7 @@ class NoSSLError(SSLValidationError):
"""Needed to connect to an HTTPS url but no ssl library available to verify the certificate"""
pass
+
# Some environments (Google Compute Engine's CoreOS deploys) do not compile
# against openssl and thus do not have any HTTPS support.
CustomHTTPSConnection = CustomHTTPSHandler = None
diff --git a/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py b/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py
index 1318199348..e8bc3e3cff 100644
--- a/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py
+++ b/lib/ansible/modules/cloud/amazon/aws_elasticbeanstalk_app.py
@@ -222,5 +222,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/aws_glue_connection.py b/lib/ansible/modules/cloud/amazon/aws_glue_connection.py
index 895d192828..1eb2d20d14 100644
--- a/lib/ansible/modules/cloud/amazon/aws_glue_connection.py
+++ b/lib/ansible/modules/cloud/amazon/aws_glue_connection.py
@@ -325,5 +325,6 @@ def main():
else:
delete_glue_connection(connection_glue, module, glue_connection)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/aws_glue_job.py b/lib/ansible/modules/cloud/amazon/aws_glue_job.py
index bb23569c2a..857e0d4dea 100644
--- a/lib/ansible/modules/cloud/amazon/aws_glue_job.py
+++ b/lib/ansible/modules/cloud/amazon/aws_glue_job.py
@@ -361,5 +361,6 @@ def main():
else:
delete_glue_job(connection, module, glue_job)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/aws_s3_cors.py b/lib/ansible/modules/cloud/amazon/aws_s3_cors.py
index 8b7fe8f870..ea45f81157 100644
--- a/lib/ansible/modules/cloud/amazon/aws_s3_cors.py
+++ b/lib/ansible/modules/cloud/amazon/aws_s3_cors.py
@@ -187,5 +187,6 @@ def main():
elif state == 'absent':
destroy_bucket_cors(client, module)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py
index 23103e8c8a..eb6c51bd18 100644
--- a/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py
+++ b/lib/ansible/modules/cloud/amazon/ec2_vpc_vpn.py
@@ -727,5 +727,6 @@ def main():
module.exit_json(changed=changed, **camel_dict_to_snake_dict(response))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/elasticache.py b/lib/ansible/modules/cloud/amazon/elasticache.py
index 8bcf5cd84e..6dbf4eebb5 100644
--- a/lib/ansible/modules/cloud/amazon/elasticache.py
+++ b/lib/ansible/modules/cloud/amazon/elasticache.py
@@ -535,5 +535,6 @@ def main():
module.exit_json(**facts_result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py b/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py
index c07b9d0600..34eb0b4cf7 100644
--- a/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py
+++ b/lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py
@@ -354,5 +354,6 @@ def main():
module.exit_json(**facts_result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/elb_application_lb.py b/lib/ansible/modules/cloud/amazon/elb_application_lb.py
index f4edeb65f9..b58314d5b5 100644
--- a/lib/ansible/modules/cloud/amazon/elb_application_lb.py
+++ b/lib/ansible/modules/cloud/amazon/elb_application_lb.py
@@ -569,5 +569,6 @@ def main():
else:
delete_elb(elb)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/elb_network_lb.py b/lib/ansible/modules/cloud/amazon/elb_network_lb.py
index d33fe571fe..50c4564ffd 100644
--- a/lib/ansible/modules/cloud/amazon/elb_network_lb.py
+++ b/lib/ansible/modules/cloud/amazon/elb_network_lb.py
@@ -415,5 +415,6 @@ def main():
else:
delete_elb(elb)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/elb_target.py b/lib/ansible/modules/cloud/amazon/elb_target.py
index 260be30fca..00896d3a60 100644
--- a/lib/ansible/modules/cloud/amazon/elb_target.py
+++ b/lib/ansible/modules/cloud/amazon/elb_target.py
@@ -312,5 +312,6 @@ def main():
else:
deregister_target(connection, module)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/amazon/route53_health_check.py b/lib/ansible/modules/cloud/amazon/route53_health_check.py
index bf608083f6..f2e18df05c 100644
--- a/lib/ansible/modules/cloud/amazon/route53_health_check.py
+++ b/lib/ansible/modules/cloud/amazon/route53_health_check.py
@@ -204,6 +204,7 @@ def to_template_params(health_check):
params['string_match_part'] = HealthCheck.XMLStringMatchPart % {'string_match': health_check.string_match}
return params
+
XMLResourcePathPart = """<ResourcePath>%(resource_path)s</ResourcePath>"""
POSTXMLBody = """
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py
index 2789384ecd..434223ca3d 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset.py
@@ -309,5 +309,6 @@ def main():
"""Main execution"""
AzureRMAvailabilitySet()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py
index 67c9336f4b..e97320845c 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_availabilityset_facts.py
@@ -172,5 +172,6 @@ def main():
AzureRMAvailabilitySetFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py b/lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py
index 78478d8842..bfeecbe89e 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_containerinstance.py
@@ -424,5 +424,6 @@ def main():
"""Main execution"""
AzureRMContainerInstance()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py
index 3fe8a65687..298d5daf30 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_containerregistry.py
@@ -424,5 +424,6 @@ def main():
"""Main execution"""
AzureRMContainerRegistry()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py b/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
index 7268d04110..8da678a30a 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset.py
@@ -388,5 +388,6 @@ def gethash(self):
def main():
AzureRMRecordSet()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py
index 936c4049f0..9ee712ad1a 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_dnsrecordset_facts.py
@@ -197,5 +197,6 @@ class AzureRMRecordSetFacts(AzureRMModuleBase):
def main():
AzureRMRecordSetFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_dnszone.py b/lib/ansible/modules/cloud/azure/azure_rm_dnszone.py
index 431935da35..a63f22c451 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_dnszone.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_dnszone.py
@@ -236,5 +236,6 @@ def zone_to_dict(zone):
def main():
AzureRMDNSZone()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py
index 4ed09ec238..99f6be82d0 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_dnszone_facts.py
@@ -177,5 +177,6 @@ class AzureRMDNSZoneFacts(AzureRMModuleBase):
def main():
AzureRMDNSZoneFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py b/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py
index 23e276f9c7..430682ff34 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_functionapp.py
@@ -309,5 +309,6 @@ def main():
AzureRMFunctionApp()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_image.py b/lib/ansible/modules/cloud/azure/azure_rm_image.py
index 80f4778217..deb9b5dc15 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_image.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_image.py
@@ -316,5 +316,6 @@ class AzureRMImage(AzureRMModuleBase):
def main():
AzureRMImage()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_keyvault.py b/lib/ansible/modules/cloud/azure/azure_rm_keyvault.py
index 5d9423caf2..cb81edc855 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_keyvault.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_keyvault.py
@@ -489,5 +489,6 @@ def main():
"""Main execution"""
AzureRMVaults()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_keyvaultkey.py b/lib/ansible/modules/cloud/azure/azure_rm_keyvaultkey.py
index dbbc00c4d1..2edcdb9d71 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_keyvaultkey.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_keyvaultkey.py
@@ -291,5 +291,6 @@ class AzureRMKeyVaultKey(AzureRMModuleBase):
def main():
AzureRMKeyVaultKey()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_keyvaultsecret.py b/lib/ansible/modules/cloud/azure/azure_rm_keyvaultsecret.py
index d1919d9355..e0b9a8d562 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_keyvaultsecret.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_keyvaultsecret.py
@@ -212,5 +212,6 @@ class AzureRMKeyVaultSecret(AzureRMModuleBase):
def main():
AzureRMKeyVaultSecret()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py b/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py
index 2c713521dc..330fb2f48c 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer.py
@@ -970,5 +970,6 @@ def main():
"""Main execution"""
AzureRMLoadBalancer()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py
index 1a7f824254..1f62e715bb 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_loadbalancer_facts.py
@@ -170,5 +170,6 @@ def main():
AzureRMLoadBalancerFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py
index aa54f5544c..5ea8904d9b 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk.py
@@ -384,5 +384,6 @@ def main():
"""Main execution"""
AzureRMManagedDisk()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py
index 95abcea47d..c9b6ea3b3f 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_managed_disk_facts.py
@@ -166,5 +166,6 @@ def main():
AzureRMManagedDiskFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
index dcdb17b904..45fe0e8fb5 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_mysqldatabase.py
@@ -299,5 +299,6 @@ def main():
"""Main execution"""
AzureRMDatabases()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py b/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
index 29788af661..83ef90a45c 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_mysqlserver.py
@@ -373,5 +373,6 @@ def main():
"""Main execution"""
AzureRMServers()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py
index 33359eda36..2ba4d8e035 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_networkinterface_facts.py
@@ -206,5 +206,6 @@ class AzureRMNetworkInterfaceFacts(AzureRMModuleBase):
def main():
AzureRMNetworkInterfaceFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
index 6f47904605..dfee339251 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_postgresqldatabase.py
@@ -299,5 +299,6 @@ def main():
"""Main execution"""
AzureRMDatabases()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py b/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
index e424c7065b..bfec587100 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_postgresqlserver.py
@@ -372,5 +372,6 @@ def main():
"""Main execution"""
AzureRMServers()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_publicipaddress.py b/lib/ansible/modules/cloud/azure/azure_rm_publicipaddress.py
index 8dc5639da9..35dd8c66bd 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_publicipaddress.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_publicipaddress.py
@@ -282,5 +282,6 @@ class AzureRMPublicIPAddress(AzureRMModuleBase):
def main():
AzureRMPublicIPAddress()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py
index 7a6b60897d..8a2c817807 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py
@@ -251,5 +251,6 @@ class AzureRMResourceGroup(AzureRMModuleBase):
def main():
AzureRMResourceGroup()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
index f73b315ad6..5c0ea2ec9d 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_resourcegroup_facts.py
@@ -152,5 +152,6 @@ class AzureRMResourceGroupFacts(AzureRMModuleBase):
def main():
AzureRMResourceGroupFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_securitygroup_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_securitygroup_facts.py
index 92bc67a734..53badb4d54 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_securitygroup_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_securitygroup_facts.py
@@ -270,5 +270,6 @@ class AzureRMSecurityGroupFacts(AzureRMModuleBase):
def main():
AzureRMSecurityGroupFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_sqldatabase.py b/lib/ansible/modules/cloud/azure/azure_rm_sqldatabase.py
index 3e4b736142..345da65368 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_sqldatabase.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_sqldatabase.py
@@ -495,5 +495,6 @@ def main():
"""Main execution"""
AzureRMDatabases()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py b/lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py
index d69980e682..46c833f6fa 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py
@@ -321,5 +321,6 @@ def main():
"""Main execution"""
AzureRMServers()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_sqlserver_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_sqlserver_facts.py
index 6a679a93b2..3a22f1bc48 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_sqlserver_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_sqlserver_facts.py
@@ -200,5 +200,7 @@ class AzureRMServersFacts(AzureRMModuleBase):
def main():
AzureRMServersFacts()
+
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py b/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
index d48519b740..67cb4522b6 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_storageaccount.py
@@ -451,5 +451,6 @@ class AzureRMStorageAccount(AzureRMModuleBase):
def main():
AzureRMStorageAccount()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_storageblob.py b/lib/ansible/modules/cloud/azure/azure_rm_storageblob.py
index 711ef174c9..9e9a56cc33 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_storageblob.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_storageblob.py
@@ -545,5 +545,6 @@ class AzureRMStorageBlob(AzureRMModuleBase):
def main():
AzureRMStorageBlob()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_subnet.py b/lib/ansible/modules/cloud/azure/azure_rm_subnet.py
index ca22460fa1..62753f9e63 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_subnet.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_subnet.py
@@ -311,5 +311,6 @@ class AzureRMSubnet(AzureRMModuleBase):
def main():
AzureRMSubnet()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py
index 401ea8c0a9..48d08bb9db 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_extension.py
@@ -309,5 +309,6 @@ def main():
"""Main execution"""
AzureRMVMExtension()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py
index a470a06738..83416869cf 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset.py
@@ -851,5 +851,6 @@ class AzureRMVirtualMachineScaleSet(AzureRMModuleBase):
def main():
AzureRMVirtualMachineScaleSet()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py
index dbdec678a7..7484d9c7ed 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachine_scaleset_facts.py
@@ -277,5 +277,6 @@ def main():
AzureRMVirtualMachineScaleSetFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py
index 4fb4b694cb..a55945008d 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualmachineimage_facts.py
@@ -215,5 +215,6 @@ class AzureRMVirtualMachineImageFacts(AzureRMModuleBase):
def main():
AzureRMVirtualMachineImageFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py
index b3d1832a79..eb55334dc1 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork.py
@@ -344,5 +344,6 @@ class AzureRMVirtualNetwork(AzureRMModuleBase):
def main():
AzureRMVirtualNetwork()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py
index 04a9893b2d..2bc3bf3c34 100644
--- a/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py
+++ b/lib/ansible/modules/cloud/azure/azure_rm_virtualnetwork_facts.py
@@ -176,5 +176,6 @@ class AzureRMNetworkInterfaceFacts(AzureRMModuleBase):
def main():
AzureRMNetworkInterfaceFacts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py b/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py
index d8b14a6aeb..7805d9a1ef 100644
--- a/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py
+++ b/lib/ansible/modules/cloud/dimensiondata/dimensiondata_network.py
@@ -290,5 +290,6 @@ def main():
elif module.state == 'absent':
module.state_absent()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_address.py b/lib/ansible/modules/cloud/google/gcp_compute_address.py
index b15443dd1e..e03e46158d 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_address.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_address.py
@@ -327,5 +327,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py
index 7d7150fb6b..9f1c22765b 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_bucket.py
@@ -327,5 +327,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py
index ba660e0d15..40bb6a81fb 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_backend_service.py
@@ -852,5 +852,6 @@ class BackeServiConneDrain(object):
u'drainingTimeoutSec': self.request.get(u'drainingTimeoutSec')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_disk.py b/lib/ansible/modules/cloud/google/gcp_compute_disk.py
index e3252787aa..779e46e799 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_disk.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_disk.py
@@ -631,5 +631,6 @@ class DiskSourSnapEncrKey(object):
u'sha256': self.request.get(u'sha256')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py
index c07824e3d2..01d77b2608 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_firewall.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_firewall.py
@@ -473,5 +473,6 @@ class FirewallAllowedArray(object):
u'ports': item.get(u'ports')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
index cda8b294f4..9faca26add 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_forwarding_rule.py
@@ -521,5 +521,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py
index 687a6ee051..03b851eec0 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_global_address.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_global_address.py
@@ -323,5 +323,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py
index 51cb2870a4..503e131664 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_global_forwarding_rule.py
@@ -572,5 +572,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py
index 76bde14b66..de6fb88075 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_health_check.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_health_check.py
@@ -795,5 +795,6 @@ class HealChecSslHealChec(object):
u'proxyHeader': self.request.get(u'proxyHeader')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py
index ad91715d6a..49f0b59054 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_http_health_check.py
@@ -398,5 +398,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py
index 4c8c5cc05b..6ee3685f69 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_https_health_check.py
@@ -397,5 +397,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_image.py b/lib/ansible/modules/cloud/google/gcp_compute_image.py
index 14c63a4870..c096ada3b4 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_image.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_image.py
@@ -749,5 +749,6 @@ class ImagSourDiskEncrKey(object):
u'sha256': self.request.get(u'sha256')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance.py b/lib/ansible/modules/cloud/google/gcp_compute_instance.py
index b53a679dff..67811eb963 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_instance.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_instance.py
@@ -1464,5 +1464,6 @@ class InstanceTags(object):
u'items': self.request.get(u'items')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py
index 2aab0ece63..e6f5bc3efc 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group.py
@@ -430,5 +430,6 @@ class InstaGroupNamedPortsArray(object):
u'port': item.get(u'port')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py
index b41e6b14cd..6283afe093 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_group_manager.py
@@ -591,5 +591,6 @@ class InstGrouManaNamePortArray(object):
u'port': item.get(u'port')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py
index afce5d8a91..52b9d543bc 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_instance_template.py
@@ -1439,5 +1439,6 @@ class InstancTemplatTags(object):
u'items': self.request.get(u'items')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_network.py b/lib/ansible/modules/cloud/google/gcp_compute_network.py
index eb7b6a0c88..6575ca4825 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_network.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_network.py
@@ -354,5 +354,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_route.py b/lib/ansible/modules/cloud/google/gcp_compute_route.py
index cc86892edf..793b6c6a1a 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_route.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_route.py
@@ -414,5 +414,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py
index cae3a63dae..9e0346feb0 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_ssl_certificate.py
@@ -338,5 +338,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
index 86c3b0dd33..40bbfc43ca 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_subnetwork.py
@@ -386,5 +386,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
index 555a2da959..0434660cf0 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_http_proxy.py
@@ -348,5 +348,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
index c3a424100c..a5436c4381 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy.py
@@ -400,5 +400,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
index 93f4773846..e033b94db2 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_pool.py
@@ -419,5 +419,6 @@ def decode_request(response, module):
return response
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
index 3010bacc48..52dc5c3be2 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_ssl_proxy.py
@@ -408,5 +408,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
index 994c1cb0de..71e929d4d7 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_target_tcp_proxy.py
@@ -357,5 +357,6 @@ def raise_if_errors(response, err_path, module):
if errors is not None:
module.fail_json(msg=errors)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
index 007f45fe4c..bab7d28987 100644
--- a/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
+++ b/lib/ansible/modules/cloud/google/gcp_compute_url_map.py
@@ -673,5 +673,6 @@ class UrlMapTestsArray(object):
u'service': item.get(u'service')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_container_cluster.py b/lib/ansible/modules/cloud/google/gcp_container_cluster.py
index 66cfd52fb0..eec0bd8fa1 100644
--- a/lib/ansible/modules/cloud/google/gcp_container_cluster.py
+++ b/lib/ansible/modules/cloud/google/gcp_container_cluster.py
@@ -948,5 +948,6 @@ class ClustHorizPodAutos(object):
u'disabled': self.request.get(u'disabled')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py
index 595ba27f4e..039bf39ffb 100644
--- a/lib/ansible/modules/cloud/google/gcp_container_node_pool.py
+++ b/lib/ansible/modules/cloud/google/gcp_container_node_pool.py
@@ -760,5 +760,6 @@ class NodePoolUpgraOptio(object):
u'description': self.request.get(u'description')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py b/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py
index 6d60bb3ec3..9da6a8f294 100644
--- a/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py
+++ b/lib/ansible/modules/cloud/google/gcp_dns_managed_zone.py
@@ -281,5 +281,6 @@ def response_to_hash(module, response):
u'creationTime': response.get(u'creationTime')
}
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py
index cd1ec280c4..bb1a2c2d08 100644
--- a/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py
+++ b/lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py
@@ -457,5 +457,6 @@ def return_if_change_object(module, response):
return result
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
index 5547bd4c8d..53fbb2d371 100644
--- a/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
+++ b/lib/ansible/modules/cloud/google/gcp_pubsub_subscription.py
@@ -344,5 +344,6 @@ class SubscriPushConfig(object):
u'pushEndpoint': self.request.get(u'pushEndpoint')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py b/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py
index 0248719f5f..73d04e329b 100644
--- a/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py
+++ b/lib/ansible/modules/cloud/google/gcp_pubsub_topic.py
@@ -223,5 +223,6 @@ def encode_request(request, module):
'topics', module.params['name']])
return request
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py
index 2df5851a98..c2601fa43a 100644
--- a/lib/ansible/modules/cloud/google/gcp_storage_bucket.py
+++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket.py
@@ -1162,5 +1162,6 @@ class BucketWebsite(object):
u'notFoundPage': self.request.get(u'notFoundPage')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py
index b8c8cbca54..5f12aa8b6c 100644
--- a/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py
+++ b/lib/ansible/modules/cloud/google/gcp_storage_bucket_access_control.py
@@ -359,5 +359,6 @@ class BuckAcceContProjTeam(object):
u'team': self.request.get(u'team')
})
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/google/gcpubsub.py b/lib/ansible/modules/cloud/google/gcpubsub.py
index 882f694853..879f82565f 100644
--- a/lib/ansible/modules/cloud/google/gcpubsub.py
+++ b/lib/ansible/modules/cloud/google/gcpubsub.py
@@ -328,5 +328,6 @@ def main():
json_output.update(mod_params)
module.exit_json(**json_output)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/opennebula/one_image_facts.py b/lib/ansible/modules/cloud/opennebula/one_image_facts.py
index 2ab5c5f597..d850a0be9b 100644
--- a/lib/ansible/modules/cloud/opennebula/one_image_facts.py
+++ b/lib/ansible/modules/cloud/opennebula/one_image_facts.py
@@ -158,6 +158,7 @@ def get_all_images(client):
return pool
+
IMAGE_STATES = ['INIT', 'READY', 'USED', 'DISABLED', 'LOCKED', 'ERROR', 'CLONE', 'DELETE', 'USED_PERS', 'LOCKED_USED', 'LOCKED_USED_PERS']
diff --git a/lib/ansible/modules/cloud/opennebula/one_vm.py b/lib/ansible/modules/cloud/opennebula/one_vm.py
index 87292a2d02..b1020f0b50 100644
--- a/lib/ansible/modules/cloud/opennebula/one_vm.py
+++ b/lib/ansible/modules/cloud/opennebula/one_vm.py
@@ -1026,6 +1026,7 @@ def create_exact_count_of_vms(module, client, template_id, exact_count, attribut
return changed, instances_list, tagged_instances_list
+
VM_STATES = ['INIT', 'PENDING', 'HOLD', 'ACTIVE', 'STOPPED', 'SUSPENDED', 'DONE', '', 'POWEROFF', 'UNDEPLOYED', 'CLONING', 'CLONING_FAILURE']
LCM_STATES = ['LCM_INIT', 'PROLOG', 'BOOT', 'RUNNING', 'MIGRATE', 'SAVE_STOP',
'SAVE_SUSPEND', 'SAVE_MIGRATE', 'PROLOG_MIGRATE', 'PROLOG_RESUME',
@@ -1175,6 +1176,7 @@ def check_name_attribute(module, attributes):
module.fail_json(msg="Ilegal 'NAME' attribute: '" + attributes.get("NAME") +
"' .Signs '#' are allowed only at the end of the name and the name cannot contain only '#'.")
+
TEMPLATE_RESTRICTED_ATTRIBUTES = ["CPU", "VCPU", "OS", "FEATURES", "MEMORY", "DISK", "NIC", "INPUT", "GRAPHICS",
"CONTEXT", "CREATED_BY", "CPU_COST", "DISK_COST", "MEMORY_COST",
"TEMPLATE_ID", "VMID", "AUTOMATIC_DS_REQUIREMENTS", "DEPLOY_FOLDER", "LABELS"]
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_nics.py b/lib/ansible/modules/cloud/ovirt/ovirt_nics.py
index 6046774e0e..d2cd0143c9 100644
--- a/lib/ansible/modules/cloud/ovirt/ovirt_nics.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_nics.py
@@ -269,5 +269,6 @@ def main():
finally:
connection.close(logout=auth.get('token') is None)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py b/lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py
index ed79c5a73b..db90f3babc 100644
--- a/lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py
+++ b/lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py
@@ -103,5 +103,6 @@ def main():
finally:
connection.close(logout=auth.get('token') is None)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/packet/packet_device.py b/lib/ansible/modules/cloud/packet/packet_device.py
index 6e1518b758..95c3d8b616 100644
--- a/lib/ansible/modules/cloud/packet/packet_device.py
+++ b/lib/ansible/modules/cloud/packet/packet_device.py
@@ -636,5 +636,6 @@ def main():
module.fail_json(msg='failed to set device state %s, error: %s' %
(state, to_native(e)), exception=traceback.format_exc())
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/smartos/smartos_image_facts.py b/lib/ansible/modules/cloud/smartos/smartos_image_facts.py
index 137288e20d..589f640400 100644
--- a/lib/ansible/modules/cloud/smartos/smartos_image_facts.py
+++ b/lib/ansible/modules/cloud/smartos/smartos_image_facts.py
@@ -102,5 +102,6 @@ def main():
module.exit_json(ansible_facts=data)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py b/lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py
index daac3c8b83..c6d5b76140 100644
--- a/lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py
+++ b/lib/ansible/modules/cloud/vmware/vmware_guest_boot_manager.py
@@ -331,5 +331,6 @@ def main():
pyv = VmBootManager(module)
pyv.ensure()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/cloud/vmware/vmware_local_user_facts.py b/lib/ansible/modules/cloud/vmware/vmware_local_user_facts.py
index ef609454c9..833f7d0e49 100644
--- a/lib/ansible/modules/cloud/vmware/vmware_local_user_facts.py
+++ b/lib/ansible/modules/cloud/vmware/vmware_local_user_facts.py
@@ -107,5 +107,6 @@ def main():
vmware_local_user_facts = VMwareUserFactsManager(module)
vmware_local_user_facts.gather_user_facts()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/clustering/etcd3.py b/lib/ansible/modules/clustering/etcd3.py
index fdb1554994..a9e84b062a 100644
--- a/lib/ansible/modules/clustering/etcd3.py
+++ b/lib/ansible/modules/clustering/etcd3.py
@@ -180,5 +180,6 @@ def run_module():
def main():
run_module()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/postgresql/postgresql_db.py b/lib/ansible/modules/database/postgresql/postgresql_db.py
index 66fd1cbfae..9d6df4a98e 100644
--- a/lib/ansible/modules/database/postgresql/postgresql_db.py
+++ b/lib/ansible/modules/database/postgresql/postgresql_db.py
@@ -480,5 +480,6 @@ def main():
module.exit_json(changed=changed, db=db)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py b/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py
index 6135179ab5..46bd13042e 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_backend_servers.py
@@ -509,5 +509,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_global_variables.py b/lib/ansible/modules/database/proxysql/proxysql_global_variables.py
index 7b5b319d85..59451954c2 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_global_variables.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_global_variables.py
@@ -271,5 +271,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_manage_config.py b/lib/ansible/modules/database/proxysql/proxysql_manage_config.py
index 8f5395e740..7edf868055 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_manage_config.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_manage_config.py
@@ -221,5 +221,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py b/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
index 7d42fc5204..6aba7bb0a7 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
@@ -476,5 +476,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_query_rules.py b/lib/ansible/modules/database/proxysql/proxysql_query_rules.py
index 44af55f2a1..568e95a836 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_query_rules.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_query_rules.py
@@ -612,5 +612,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py b/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py
index 3760dce0be..d02fbf0c3d 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_replication_hostgroups.py
@@ -385,5 +385,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/database/proxysql/proxysql_scheduler.py b/lib/ansible/modules/database/proxysql/proxysql_scheduler.py
index faa63ef8ae..ba59a91138 100644
--- a/lib/ansible/modules/database/proxysql/proxysql_scheduler.py
+++ b/lib/ansible/modules/database/proxysql/proxysql_scheduler.py
@@ -420,5 +420,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/files/assemble.py b/lib/ansible/modules/files/assemble.py
index b4a74f104d..d33f42c314 100644
--- a/lib/ansible/modules/files/assemble.py
+++ b/lib/ansible/modules/files/assemble.py
@@ -241,5 +241,6 @@ def main():
result['msg'] = "OK"
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/files/ini_file.py b/lib/ansible/modules/files/ini_file.py
index cf12896b1b..38f8d3fa78 100644
--- a/lib/ansible/modules/files/ini_file.py
+++ b/lib/ansible/modules/files/ini_file.py
@@ -323,5 +323,6 @@ def main():
# Mission complete
module.exit_json(**results)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/ipa/ipa_service.py b/lib/ansible/modules/identity/ipa/ipa_service.py
index b0b65f5c43..ce2f7de2e6 100644
--- a/lib/ansible/modules/identity/ipa/ipa_service.py
+++ b/lib/ansible/modules/identity/ipa/ipa_service.py
@@ -203,5 +203,6 @@ def main():
except Exception as e:
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
index 5310116c64..9f386c6827 100644
--- a/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
+++ b/lib/ansible/modules/identity/ipa/ipa_sudocmdgroup.py
@@ -173,5 +173,6 @@ def main():
except Exception as e:
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/keycloak/keycloak_client.py b/lib/ansible/modules/identity/keycloak/keycloak_client.py
index 7fcaa67ea1..f6e0fc7658 100644
--- a/lib/ansible/modules/identity/keycloak/keycloak_client.py
+++ b/lib/ansible/modules/identity/keycloak/keycloak_client.py
@@ -807,5 +807,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py b/lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py
index cb7c4e8fcb..1da26b76a0 100644
--- a/lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py
+++ b/lib/ansible/modules/identity/keycloak/keycloak_clienttemplate.py
@@ -401,5 +401,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/identity/opendj/opendj_backendprop.py b/lib/ansible/modules/identity/opendj/opendj_backendprop.py
index dfc22e08d1..38ae60d7eb 100644
--- a/lib/ansible/modules/identity/opendj/opendj_backendprop.py
+++ b/lib/ansible/modules/identity/opendj/opendj_backendprop.py
@@ -199,5 +199,6 @@ def main():
else:
module.exit_json(changed=False)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_exchange.py b/lib/ansible/modules/messaging/rabbitmq_exchange.py
index 9f31e57dcf..c65c846edd 100644
--- a/lib/ansible/modules/messaging/rabbitmq_exchange.py
+++ b/lib/ansible/modules/messaging/rabbitmq_exchange.py
@@ -219,5 +219,6 @@ def main():
result['changed'] = False
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_parameter.py b/lib/ansible/modules/messaging/rabbitmq_parameter.py
index 91039397eb..9ac93d7a4d 100644
--- a/lib/ansible/modules/messaging/rabbitmq_parameter.py
+++ b/lib/ansible/modules/messaging/rabbitmq_parameter.py
@@ -151,5 +151,6 @@ def main():
result['state'] = state
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_policy.py b/lib/ansible/modules/messaging/rabbitmq_policy.py
index 9109283c33..8721889b53 100644
--- a/lib/ansible/modules/messaging/rabbitmq_policy.py
+++ b/lib/ansible/modules/messaging/rabbitmq_policy.py
@@ -163,5 +163,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_queue.py b/lib/ansible/modules/messaging/rabbitmq_queue.py
index 9d2c490feb..0261e05f43 100644
--- a/lib/ansible/modules/messaging/rabbitmq_queue.py
+++ b/lib/ansible/modules/messaging/rabbitmq_queue.py
@@ -264,5 +264,6 @@ def main():
result['changed'] = False
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_user.py b/lib/ansible/modules/messaging/rabbitmq_user.py
index 6d87d7626f..c8cb83fac6 100644
--- a/lib/ansible/modules/messaging/rabbitmq_user.py
+++ b/lib/ansible/modules/messaging/rabbitmq_user.py
@@ -312,5 +312,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/messaging/rabbitmq_vhost.py b/lib/ansible/modules/messaging/rabbitmq_vhost.py
index 59d8e61a2d..cd171b8536 100644
--- a/lib/ansible/modules/messaging/rabbitmq_vhost.py
+++ b/lib/ansible/modules/messaging/rabbitmq_vhost.py
@@ -141,5 +141,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/grafana_dashboard.py b/lib/ansible/modules/monitoring/grafana_dashboard.py
index f9346aa049..a07d33b916 100644
--- a/lib/ansible/modules/monitoring/grafana_dashboard.py
+++ b/lib/ansible/modules/monitoring/grafana_dashboard.py
@@ -441,5 +441,6 @@ def main():
)
return
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/grafana_datasource.py b/lib/ansible/modules/monitoring/grafana_datasource.py
index d6145790f4..00d8c6f087 100644
--- a/lib/ansible/modules/monitoring/grafana_datasource.py
+++ b/lib/ansible/modules/monitoring/grafana_datasource.py
@@ -536,5 +536,6 @@ def main():
)
return
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/grafana_plugin.py b/lib/ansible/modules/monitoring/grafana_plugin.py
index 5cf043917f..c6be8a3c2b 100644
--- a/lib/ansible/modules/monitoring/grafana_plugin.py
+++ b/lib/ansible/modules/monitoring/grafana_plugin.py
@@ -226,5 +226,6 @@ def main():
)
return
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/sensu_client.py b/lib/ansible/modules/monitoring/sensu_client.py
index 4da3adabb3..fe1c739fd9 100644
--- a/lib/ansible/modules/monitoring/sensu_client.py
+++ b/lib/ansible/modules/monitoring/sensu_client.py
@@ -246,5 +246,6 @@ def main():
module.fail_json(msg='Unable to write file {0}: {1}'.format(path,
str(e)))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/sensu_handler.py b/lib/ansible/modules/monitoring/sensu_handler.py
index 88d6341825..be69e3d55e 100644
--- a/lib/ansible/modules/monitoring/sensu_handler.py
+++ b/lib/ansible/modules/monitoring/sensu_handler.py
@@ -259,5 +259,6 @@ def main():
module.fail_json(msg='Unable to write file {0}: {1}'.format(path,
str(e)))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_group_facts.py b/lib/ansible/modules/monitoring/zabbix/zabbix_group_facts.py
index 20f822c665..64c0486a53 100644
--- a/lib/ansible/modules/monitoring/zabbix/zabbix_group_facts.py
+++ b/lib/ansible/modules/monitoring/zabbix/zabbix_group_facts.py
@@ -128,5 +128,6 @@ def main():
host_groups = host.get_group_ids_by_group_names(hostgroup_name)
module.exit_json(host_groups=host_groups)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py b/lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py
index d6381ddbe1..99bb7667fb 100644
--- a/lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py
+++ b/lib/ansible/modules/monitoring/zabbix/zabbix_host_facts.py
@@ -207,5 +207,6 @@ def main():
else:
module.exit_json(ok=False, hosts=[], result="No Host present")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/a10/a10_service_group.py b/lib/ansible/modules/network/a10/a10_service_group.py
index 943fe29c3b..fed5b85c72 100644
--- a/lib/ansible/modules/network/a10/a10_service_group.py
+++ b/lib/ansible/modules/network/a10/a10_service_group.py
@@ -331,5 +331,6 @@ def main():
axapi_call(module, session_url + '&method=session.close')
module.exit_json(changed=changed, content=result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/aci/aci_aep.py b/lib/ansible/modules/network/aci/aci_aep.py
index 387b1bd1cf..a775c2aa84 100644
--- a/lib/ansible/modules/network/aci/aci_aep.py
+++ b/lib/ansible/modules/network/aci/aci_aep.py
@@ -254,5 +254,6 @@ def main():
aci.exit_json()
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aci/aci_contract_subject.py b/lib/ansible/modules/network/aci/aci_contract_subject.py
index 0e75715faf..1a660b71dc 100644
--- a/lib/ansible/modules/network/aci/aci_contract_subject.py
+++ b/lib/ansible/modules/network/aci/aci_contract_subject.py
@@ -328,5 +328,6 @@ def main():
aci.exit_json()
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_asn_pool.py b/lib/ansible/modules/network/aos/_aos_asn_pool.py
index 364cbf4206..49ec51daa7 100644
--- a/lib/ansible/modules/network/aos/_aos_asn_pool.py
+++ b/lib/ansible/modules/network/aos/_aos_asn_pool.py
@@ -341,5 +341,6 @@ def main():
asn_pool(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_device.py b/lib/ansible/modules/network/aos/_aos_device.py
index 298bf53d4e..6413456e75 100644
--- a/lib/ansible/modules/network/aos/_aos_device.py
+++ b/lib/ansible/modules/network/aos/_aos_device.py
@@ -217,5 +217,6 @@ def main():
aos_device(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_external_router.py b/lib/ansible/modules/network/aos/_aos_external_router.py
index ffa8f0a6d9..5aa8c1827e 100644
--- a/lib/ansible/modules/network/aos/_aos_external_router.py
+++ b/lib/ansible/modules/network/aos/_aos_external_router.py
@@ -337,5 +337,6 @@ def main():
ext_router(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_ip_pool.py b/lib/ansible/modules/network/aos/_aos_ip_pool.py
index 7bf983b562..52104d5a19 100644
--- a/lib/ansible/modules/network/aos/_aos_ip_pool.py
+++ b/lib/ansible/modules/network/aos/_aos_ip_pool.py
@@ -348,5 +348,6 @@ def main():
ip_pool(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_logical_device.py b/lib/ansible/modules/network/aos/_aos_logical_device.py
index 4a73b1ef20..7cf6022be2 100644
--- a/lib/ansible/modules/network/aos/_aos_logical_device.py
+++ b/lib/ansible/modules/network/aos/_aos_logical_device.py
@@ -258,5 +258,6 @@ def main():
logical_device(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_logical_device_map.py b/lib/ansible/modules/network/aos/_aos_logical_device_map.py
index c6378236ca..500d46de55 100644
--- a/lib/ansible/modules/network/aos/_aos_logical_device_map.py
+++ b/lib/ansible/modules/network/aos/_aos_logical_device_map.py
@@ -281,5 +281,6 @@ def main():
logical_device_map(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_login.py b/lib/ansible/modules/network/aos/_aos_login.py
index c67b3413ab..7d53338b4b 100644
--- a/lib/ansible/modules/network/aos/_aos_login.py
+++ b/lib/ansible/modules/network/aos/_aos_login.py
@@ -134,5 +134,6 @@ def main():
aos_login(module)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/aos/_aos_rack_type.py b/lib/ansible/modules/network/aos/_aos_rack_type.py
index 01514d0e8f..83aa969f13 100644
--- a/lib/ansible/modules/network/aos/_aos_rack_type.py
+++ b/lib/ansible/modules/network/aos/_aos_rack_type.py
@@ -255,5 +255,6 @@ def main():
rack_type(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/aos/_aos_template.py b/lib/ansible/modules/network/aos/_aos_template.py
index 0fa7058f95..c26bb95b73 100644
--- a/lib/ansible/modules/network/aos/_aos_template.py
+++ b/lib/ansible/modules/network/aos/_aos_template.py
@@ -272,5 +272,6 @@ def main():
aos_template(module)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/avi/avi_actiongroupconfig.py b/lib/ansible/modules/network/avi/avi_actiongroupconfig.py
index 2b3184e072..6a671c2f7d 100644
--- a/lib/ansible/modules/network/avi/avi_actiongroupconfig.py
+++ b/lib/ansible/modules/network/avi/avi_actiongroupconfig.py
@@ -149,5 +149,6 @@ def main():
return avi_ansible_api(module, 'actiongroupconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_alertconfig.py b/lib/ansible/modules/network/avi/avi_alertconfig.py
index c8821ffc3d..dc4f2fc7aa 100644
--- a/lib/ansible/modules/network/avi/avi_alertconfig.py
+++ b/lib/ansible/modules/network/avi/avi_alertconfig.py
@@ -222,5 +222,6 @@ def main():
return avi_ansible_api(module, 'alertconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_alertemailconfig.py b/lib/ansible/modules/network/avi/avi_alertemailconfig.py
index dd1c33bd5e..b6651bd3fe 100644
--- a/lib/ansible/modules/network/avi/avi_alertemailconfig.py
+++ b/lib/ansible/modules/network/avi/avi_alertemailconfig.py
@@ -118,5 +118,6 @@ def main():
return avi_ansible_api(module, 'alertemailconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_alertscriptconfig.py b/lib/ansible/modules/network/avi/avi_alertscriptconfig.py
index 6114a04c84..b0d03c7150 100644
--- a/lib/ansible/modules/network/avi/avi_alertscriptconfig.py
+++ b/lib/ansible/modules/network/avi/avi_alertscriptconfig.py
@@ -111,5 +111,6 @@ def main():
return avi_ansible_api(module, 'alertscriptconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_alertsyslogconfig.py b/lib/ansible/modules/network/avi/avi_alertsyslogconfig.py
index 305ff04973..56e1adb505 100644
--- a/lib/ansible/modules/network/avi/avi_alertsyslogconfig.py
+++ b/lib/ansible/modules/network/avi/avi_alertsyslogconfig.py
@@ -117,5 +117,6 @@ def main():
return avi_ansible_api(module, 'alertsyslogconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_analyticsprofile.py b/lib/ansible/modules/network/avi/avi_analyticsprofile.py
index a3687e9b42..87282cf1be 100644
--- a/lib/ansible/modules/network/avi/avi_analyticsprofile.py
+++ b/lib/ansible/modules/network/avi/avi_analyticsprofile.py
@@ -564,5 +564,6 @@ def main():
return avi_ansible_api(module, 'analyticsprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_api_version.py b/lib/ansible/modules/network/avi/avi_api_version.py
index f0887c565e..b26ec0fcfe 100644
--- a/lib/ansible/modules/network/avi/avi_api_version.py
+++ b/lib/ansible/modules/network/avi/avi_api_version.py
@@ -85,5 +85,6 @@ def main():
except Exception as e:
module.fail_json(msg="Unable to get an AVI session. {}".format(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py b/lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py
index 887a5cbf4a..e11baa2127 100644
--- a/lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py
+++ b/lib/ansible/modules/network/avi/avi_applicationpersistenceprofile.py
@@ -163,5 +163,6 @@ def main():
return avi_ansible_api(module, 'applicationpersistenceprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_applicationprofile.py b/lib/ansible/modules/network/avi/avi_applicationprofile.py
index 5fa531d980..149275592d 100644
--- a/lib/ansible/modules/network/avi/avi_applicationprofile.py
+++ b/lib/ansible/modules/network/avi/avi_applicationprofile.py
@@ -200,5 +200,6 @@ def main():
return avi_ansible_api(module, 'applicationprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_authprofile.py b/lib/ansible/modules/network/avi/avi_authprofile.py
index 90aaf9f955..a2fc88ee55 100644
--- a/lib/ansible/modules/network/avi/avi_authprofile.py
+++ b/lib/ansible/modules/network/avi/avi_authprofile.py
@@ -157,5 +157,6 @@ def main():
return avi_ansible_api(module, 'authprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_autoscalelaunchconfig.py b/lib/ansible/modules/network/avi/avi_autoscalelaunchconfig.py
index ec57665857..f036d2b05b 100644
--- a/lib/ansible/modules/network/avi/avi_autoscalelaunchconfig.py
+++ b/lib/ansible/modules/network/avi/avi_autoscalelaunchconfig.py
@@ -128,5 +128,6 @@ def main():
return avi_ansible_api(module, 'autoscalelaunchconfig',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_backup.py b/lib/ansible/modules/network/avi/avi_backup.py
index 0f649e36df..49c6cec7ac 100644
--- a/lib/ansible/modules/network/avi/avi_backup.py
+++ b/lib/ansible/modules/network/avi/avi_backup.py
@@ -128,5 +128,6 @@ def main():
return avi_ansible_api(module, 'backup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_backupconfiguration.py b/lib/ansible/modules/network/avi/avi_backupconfiguration.py
index 37add350b9..ab60cfc691 100644
--- a/lib/ansible/modules/network/avi/avi_backupconfiguration.py
+++ b/lib/ansible/modules/network/avi/avi_backupconfiguration.py
@@ -143,5 +143,6 @@ def main():
return avi_ansible_api(module, 'backupconfiguration',
set(['backup_passphrase']))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py b/lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py
index a23fb811f4..44e1b8ff80 100644
--- a/lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py
+++ b/lib/ansible/modules/network/avi/avi_certificatemanagementprofile.py
@@ -115,5 +115,6 @@ def main():
return avi_ansible_api(module, 'certificatemanagementprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_cloud.py b/lib/ansible/modules/network/avi/avi_cloud.py
index 92bed828ad..50d44dcea0 100644
--- a/lib/ansible/modules/network/avi/avi_cloud.py
+++ b/lib/ansible/modules/network/avi/avi_cloud.py
@@ -272,5 +272,6 @@ def main():
return avi_ansible_api(module, 'cloud',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_cloudconnectoruser.py b/lib/ansible/modules/network/avi/avi_cloudconnectoruser.py
index 2cfe5e9271..5c65eba499 100644
--- a/lib/ansible/modules/network/avi/avi_cloudconnectoruser.py
+++ b/lib/ansible/modules/network/avi/avi_cloudconnectoruser.py
@@ -128,5 +128,6 @@ def main():
return avi_ansible_api(module, 'cloudconnectoruser',
set(['private_key']))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_cloudproperties.py b/lib/ansible/modules/network/avi/avi_cloudproperties.py
index 24a3fc76b5..79caab1ac5 100644
--- a/lib/ansible/modules/network/avi/avi_cloudproperties.py
+++ b/lib/ansible/modules/network/avi/avi_cloudproperties.py
@@ -115,5 +115,6 @@ def main():
return avi_ansible_api(module, 'cloudproperties',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_cluster.py b/lib/ansible/modules/network/avi/avi_cluster.py
index df06eafb53..871be26f42 100644
--- a/lib/ansible/modules/network/avi/avi_cluster.py
+++ b/lib/ansible/modules/network/avi/avi_cluster.py
@@ -120,5 +120,6 @@ def main():
return avi_ansible_api(module, 'cluster',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_clusterclouddetails.py b/lib/ansible/modules/network/avi/avi_clusterclouddetails.py
index 4bdbad7915..88fed62315 100644
--- a/lib/ansible/modules/network/avi/avi_clusterclouddetails.py
+++ b/lib/ansible/modules/network/avi/avi_clusterclouddetails.py
@@ -111,5 +111,6 @@ def main():
return avi_ansible_api(module, 'clusterclouddetails',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_controllerproperties.py b/lib/ansible/modules/network/avi/avi_controllerproperties.py
index 16aebb12f7..cb22e54ff5 100644
--- a/lib/ansible/modules/network/avi/avi_controllerproperties.py
+++ b/lib/ansible/modules/network/avi/avi_controllerproperties.py
@@ -383,5 +383,6 @@ def main():
return avi_ansible_api(module, 'controllerproperties',
set(['portal_token']))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_customipamdnsprofile.py b/lib/ansible/modules/network/avi/avi_customipamdnsprofile.py
index 110da20229..fb9292f7e4 100644
--- a/lib/ansible/modules/network/avi/avi_customipamdnsprofile.py
+++ b/lib/ansible/modules/network/avi/avi_customipamdnsprofile.py
@@ -118,5 +118,6 @@ def main():
return avi_ansible_api(module, 'customipamdnsprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_dnspolicy.py b/lib/ansible/modules/network/avi/avi_dnspolicy.py
index 4206039e66..77b0e9fb86 100644
--- a/lib/ansible/modules/network/avi/avi_dnspolicy.py
+++ b/lib/ansible/modules/network/avi/avi_dnspolicy.py
@@ -123,5 +123,6 @@ def main():
return avi_ansible_api(module, 'dnspolicy',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_errorpagebody.py b/lib/ansible/modules/network/avi/avi_errorpagebody.py
index f49a168fe6..477bae5b30 100644
--- a/lib/ansible/modules/network/avi/avi_errorpagebody.py
+++ b/lib/ansible/modules/network/avi/avi_errorpagebody.py
@@ -111,5 +111,6 @@ def main():
return avi_ansible_api(module, 'errorpagebody',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_errorpageprofile.py b/lib/ansible/modules/network/avi/avi_errorpageprofile.py
index c40c8b78b0..1621a2fbde 100644
--- a/lib/ansible/modules/network/avi/avi_errorpageprofile.py
+++ b/lib/ansible/modules/network/avi/avi_errorpageprofile.py
@@ -129,5 +129,6 @@ def main():
return avi_ansible_api(module, 'errorpageprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_gslb.py b/lib/ansible/modules/network/avi/avi_gslb.py
index 7022839861..45a79d977b 100644
--- a/lib/ansible/modules/network/avi/avi_gslb.py
+++ b/lib/ansible/modules/network/avi/avi_gslb.py
@@ -176,5 +176,6 @@ def main():
return avi_ansible_api(module, 'gslb',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py b/lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py
index 2042a4290d..d51bb16470 100644
--- a/lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py
+++ b/lib/ansible/modules/network/avi/avi_gslbapplicationpersistenceprofile.py
@@ -112,5 +112,6 @@ def main():
return avi_ansible_api(module, 'gslbapplicationpersistenceprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py b/lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
index 29735340ee..5cf1937a9a 100644
--- a/lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
+++ b/lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
@@ -126,5 +126,6 @@ def main():
return avi_ansible_api(module, 'gslbgeodbprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py b/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py
index f6ad0e2148..b931d10b40 100644
--- a/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py
+++ b/lib/ansible/modules/network/avi/avi_gslbhealthmonitor.py
@@ -173,5 +173,6 @@ def main():
return avi_ansible_api(module, 'gslbhealthmonitor',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_gslbservice.py b/lib/ansible/modules/network/avi/avi_gslbservice.py
index 2851c673f0..03c5399557 100644
--- a/lib/ansible/modules/network/avi/avi_gslbservice.py
+++ b/lib/ansible/modules/network/avi/avi_gslbservice.py
@@ -226,5 +226,6 @@ def main():
return avi_ansible_api(module, 'gslbservice',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_hardwaresecuritymodulegroup.py b/lib/ansible/modules/network/avi/avi_hardwaresecuritymodulegroup.py
index 85f0298575..61b26acc76 100644
--- a/lib/ansible/modules/network/avi/avi_hardwaresecuritymodulegroup.py
+++ b/lib/ansible/modules/network/avi/avi_hardwaresecuritymodulegroup.py
@@ -110,5 +110,6 @@ def main():
return avi_ansible_api(module, 'hardwaresecuritymodulegroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_healthmonitor.py b/lib/ansible/modules/network/avi/avi_healthmonitor.py
index 7b521076f3..8881c8b0f2 100644
--- a/lib/ansible/modules/network/avi/avi_healthmonitor.py
+++ b/lib/ansible/modules/network/avi/avi_healthmonitor.py
@@ -195,5 +195,6 @@ def main():
return avi_ansible_api(module, 'healthmonitor',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_httppolicyset.py b/lib/ansible/modules/network/avi/avi_httppolicyset.py
index 2ec38d8776..0dc42b61f2 100644
--- a/lib/ansible/modules/network/avi/avi_httppolicyset.py
+++ b/lib/ansible/modules/network/avi/avi_httppolicyset.py
@@ -166,5 +166,6 @@ def main():
return avi_ansible_api(module, 'httppolicyset',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_ipaddrgroup.py b/lib/ansible/modules/network/avi/avi_ipaddrgroup.py
index bfd5f0f920..fd2cd3c38f 100644
--- a/lib/ansible/modules/network/avi/avi_ipaddrgroup.py
+++ b/lib/ansible/modules/network/avi/avi_ipaddrgroup.py
@@ -156,5 +156,6 @@ def main():
return avi_ansible_api(module, 'ipaddrgroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py b/lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py
index 1ce046fb4b..51f6188700 100644
--- a/lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py
+++ b/lib/ansible/modules/network/avi/avi_ipamdnsproviderprofile.py
@@ -168,5 +168,6 @@ def main():
return avi_ansible_api(module, 'ipamdnsproviderprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_l4policyset.py b/lib/ansible/modules/network/avi/avi_l4policyset.py
index f9517e833f..33817b5810 100644
--- a/lib/ansible/modules/network/avi/avi_l4policyset.py
+++ b/lib/ansible/modules/network/avi/avi_l4policyset.py
@@ -126,5 +126,6 @@ def main():
return avi_ansible_api(module, 'l4policyset',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_microservicegroup.py b/lib/ansible/modules/network/avi/avi_microservicegroup.py
index 17dafc24f4..86116ae611 100644
--- a/lib/ansible/modules/network/avi/avi_microservicegroup.py
+++ b/lib/ansible/modules/network/avi/avi_microservicegroup.py
@@ -119,5 +119,6 @@ def main():
return avi_ansible_api(module, 'microservicegroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_network.py b/lib/ansible/modules/network/avi/avi_network.py
index 9053699bcc..c0acbfd479 100644
--- a/lib/ansible/modules/network/avi/avi_network.py
+++ b/lib/ansible/modules/network/avi/avi_network.py
@@ -146,5 +146,6 @@ def main():
return avi_ansible_api(module, 'network',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_networkprofile.py b/lib/ansible/modules/network/avi/avi_networkprofile.py
index a265f02549..09a5a160ce 100644
--- a/lib/ansible/modules/network/avi/avi_networkprofile.py
+++ b/lib/ansible/modules/network/avi/avi_networkprofile.py
@@ -121,5 +121,6 @@ def main():
return avi_ansible_api(module, 'networkprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_networksecuritypolicy.py b/lib/ansible/modules/network/avi/avi_networksecuritypolicy.py
index 5600229fad..d6ff13a39d 100644
--- a/lib/ansible/modules/network/avi/avi_networksecuritypolicy.py
+++ b/lib/ansible/modules/network/avi/avi_networksecuritypolicy.py
@@ -134,5 +134,6 @@ def main():
return avi_ansible_api(module, 'networksecuritypolicy',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_pkiprofile.py b/lib/ansible/modules/network/avi/avi_pkiprofile.py
index 0bc4125de7..887330460b 100644
--- a/lib/ansible/modules/network/avi/avi_pkiprofile.py
+++ b/lib/ansible/modules/network/avi/avi_pkiprofile.py
@@ -148,5 +148,6 @@ def main():
return avi_ansible_api(module, 'pkiprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_pool.py b/lib/ansible/modules/network/avi/avi_pool.py
index 50122f2d4a..265ee963a7 100644
--- a/lib/ansible/modules/network/avi/avi_pool.py
+++ b/lib/ansible/modules/network/avi/avi_pool.py
@@ -446,5 +446,6 @@ def main():
return avi_ansible_api(module, 'pool',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_poolgroup.py b/lib/ansible/modules/network/avi/avi_poolgroup.py
index cbdef5d640..01da7f45f7 100644
--- a/lib/ansible/modules/network/avi/avi_poolgroup.py
+++ b/lib/ansible/modules/network/avi/avi_poolgroup.py
@@ -158,5 +158,6 @@ def main():
return avi_ansible_api(module, 'poolgroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_poolgroupdeploymentpolicy.py b/lib/ansible/modules/network/avi/avi_poolgroupdeploymentpolicy.py
index 6f29332553..e1ae8bb626 100644
--- a/lib/ansible/modules/network/avi/avi_poolgroupdeploymentpolicy.py
+++ b/lib/ansible/modules/network/avi/avi_poolgroupdeploymentpolicy.py
@@ -157,5 +157,6 @@ def main():
return avi_ansible_api(module, 'poolgroupdeploymentpolicy',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_prioritylabels.py b/lib/ansible/modules/network/avi/avi_prioritylabels.py
index 50fe935487..c8a268c57d 100644
--- a/lib/ansible/modules/network/avi/avi_prioritylabels.py
+++ b/lib/ansible/modules/network/avi/avi_prioritylabels.py
@@ -117,5 +117,6 @@ def main():
return avi_ansible_api(module, 'prioritylabels',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_role.py b/lib/ansible/modules/network/avi/avi_role.py
index abb495f75b..a6e9b846d6 100644
--- a/lib/ansible/modules/network/avi/avi_role.py
+++ b/lib/ansible/modules/network/avi/avi_role.py
@@ -110,5 +110,6 @@ def main():
return avi_ansible_api(module, 'role',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_scheduler.py b/lib/ansible/modules/network/avi/avi_scheduler.py
index d6888a7678..3d0b735ac6 100644
--- a/lib/ansible/modules/network/avi/avi_scheduler.py
+++ b/lib/ansible/modules/network/avi/avi_scheduler.py
@@ -151,5 +151,6 @@ def main():
return avi_ansible_api(module, 'scheduler',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_seproperties.py b/lib/ansible/modules/network/avi/avi_seproperties.py
index dfbe9901a3..c98cb93db4 100644
--- a/lib/ansible/modules/network/avi/avi_seproperties.py
+++ b/lib/ansible/modules/network/avi/avi_seproperties.py
@@ -110,5 +110,6 @@ def main():
return avi_ansible_api(module, 'seproperties',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_serverautoscalepolicy.py b/lib/ansible/modules/network/avi/avi_serverautoscalepolicy.py
index ca05404f06..848944e98b 100644
--- a/lib/ansible/modules/network/avi/avi_serverautoscalepolicy.py
+++ b/lib/ansible/modules/network/avi/avi_serverautoscalepolicy.py
@@ -179,5 +179,6 @@ def main():
return avi_ansible_api(module, 'serverautoscalepolicy',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_serviceengine.py b/lib/ansible/modules/network/avi/avi_serviceengine.py
index 242a9426a2..00e5502e5c 100644
--- a/lib/ansible/modules/network/avi/avi_serviceengine.py
+++ b/lib/ansible/modules/network/avi/avi_serviceengine.py
@@ -168,5 +168,6 @@ def main():
return avi_ansible_api(module, 'serviceengine',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_serviceenginegroup.py b/lib/ansible/modules/network/avi/avi_serviceenginegroup.py
index a7bd1c2d03..a03e63ece5 100644
--- a/lib/ansible/modules/network/avi/avi_serviceenginegroup.py
+++ b/lib/ansible/modules/network/avi/avi_serviceenginegroup.py
@@ -774,5 +774,6 @@ def main():
return avi_ansible_api(module, 'serviceenginegroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_snmptrapprofile.py b/lib/ansible/modules/network/avi/avi_snmptrapprofile.py
index cf7ba25c93..f502d9548a 100644
--- a/lib/ansible/modules/network/avi/avi_snmptrapprofile.py
+++ b/lib/ansible/modules/network/avi/avi_snmptrapprofile.py
@@ -109,5 +109,6 @@ def main():
return avi_ansible_api(module, 'snmptrapprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_sslkeyandcertificate.py b/lib/ansible/modules/network/avi/avi_sslkeyandcertificate.py
index a80d1d0f7c..1d253515ea 100644
--- a/lib/ansible/modules/network/avi/avi_sslkeyandcertificate.py
+++ b/lib/ansible/modules/network/avi/avi_sslkeyandcertificate.py
@@ -169,5 +169,6 @@ def main():
return avi_ansible_api(module, 'sslkeyandcertificate',
set(['key']))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_sslprofile.py b/lib/ansible/modules/network/avi/avi_sslprofile.py
index a36b183e00..a2b2822942 100644
--- a/lib/ansible/modules/network/avi/avi_sslprofile.py
+++ b/lib/ansible/modules/network/avi/avi_sslprofile.py
@@ -208,5 +208,6 @@ def main():
return avi_ansible_api(module, 'sslprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_stringgroup.py b/lib/ansible/modules/network/avi/avi_stringgroup.py
index a30b3b2164..46ada6147c 100644
--- a/lib/ansible/modules/network/avi/avi_stringgroup.py
+++ b/lib/ansible/modules/network/avi/avi_stringgroup.py
@@ -132,5 +132,6 @@ def main():
return avi_ansible_api(module, 'stringgroup',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_systemconfiguration.py b/lib/ansible/modules/network/avi/avi_systemconfiguration.py
index 039507714b..71f6f750ea 100644
--- a/lib/ansible/modules/network/avi/avi_systemconfiguration.py
+++ b/lib/ansible/modules/network/avi/avi_systemconfiguration.py
@@ -170,5 +170,6 @@ def main():
return avi_ansible_api(module, 'systemconfiguration',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_tenant.py b/lib/ansible/modules/network/avi/avi_tenant.py
index e2aa6a89b3..9072fe8baf 100644
--- a/lib/ansible/modules/network/avi/avi_tenant.py
+++ b/lib/ansible/modules/network/avi/avi_tenant.py
@@ -125,5 +125,6 @@ def main():
return avi_ansible_api(module, 'tenant',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_trafficcloneprofile.py b/lib/ansible/modules/network/avi/avi_trafficcloneprofile.py
index fb4e8bf05c..7966e61d8f 100644
--- a/lib/ansible/modules/network/avi/avi_trafficcloneprofile.py
+++ b/lib/ansible/modules/network/avi/avi_trafficcloneprofile.py
@@ -124,5 +124,6 @@ def main():
return avi_ansible_api(module, 'trafficcloneprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_useraccountprofile.py b/lib/ansible/modules/network/avi/avi_useraccountprofile.py
index e8982f1fe8..1639fa9fd1 100644
--- a/lib/ansible/modules/network/avi/avi_useraccountprofile.py
+++ b/lib/ansible/modules/network/avi/avi_useraccountprofile.py
@@ -134,5 +134,6 @@ def main():
return avi_ansible_api(module, 'useraccountprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_virtualservice.py b/lib/ansible/modules/network/avi/avi_virtualservice.py
index 2d5e29c7e8..4981e37452 100644
--- a/lib/ansible/modules/network/avi/avi_virtualservice.py
+++ b/lib/ansible/modules/network/avi/avi_virtualservice.py
@@ -602,5 +602,6 @@ def main():
return avi_ansible_api(module, 'virtualservice',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_vrfcontext.py b/lib/ansible/modules/network/avi/avi_vrfcontext.py
index 14e0995766..a5e391747d 100644
--- a/lib/ansible/modules/network/avi/avi_vrfcontext.py
+++ b/lib/ansible/modules/network/avi/avi_vrfcontext.py
@@ -142,5 +142,6 @@ def main():
return avi_ansible_api(module, 'vrfcontext',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_vsdatascriptset.py b/lib/ansible/modules/network/avi/avi_vsdatascriptset.py
index 2f27a6fa28..102707dd55 100644
--- a/lib/ansible/modules/network/avi/avi_vsdatascriptset.py
+++ b/lib/ansible/modules/network/avi/avi_vsdatascriptset.py
@@ -140,5 +140,6 @@ def main():
return avi_ansible_api(module, 'vsdatascriptset',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_vsvip.py b/lib/ansible/modules/network/avi/avi_vsvip.py
index bce260bd7a..752ac899ca 100644
--- a/lib/ansible/modules/network/avi/avi_vsvip.py
+++ b/lib/ansible/modules/network/avi/avi_vsvip.py
@@ -138,5 +138,6 @@ def main():
return avi_ansible_api(module, 'vsvip',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_wafpolicy.py b/lib/ansible/modules/network/avi/avi_wafpolicy.py
index d97fdd6c37..63ae3d02ce 100644
--- a/lib/ansible/modules/network/avi/avi_wafpolicy.py
+++ b/lib/ansible/modules/network/avi/avi_wafpolicy.py
@@ -157,5 +157,6 @@ def main():
return avi_ansible_api(module, 'wafpolicy',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_wafprofile.py b/lib/ansible/modules/network/avi/avi_wafprofile.py
index 01e4fb2d47..56c2216218 100644
--- a/lib/ansible/modules/network/avi/avi_wafprofile.py
+++ b/lib/ansible/modules/network/avi/avi_wafprofile.py
@@ -121,5 +121,6 @@ def main():
return avi_ansible_api(module, 'wafprofile',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/avi/avi_webhook.py b/lib/ansible/modules/network/avi/avi_webhook.py
index 5ec573669b..5d26b86fbc 100644
--- a/lib/ansible/modules/network/avi/avi_webhook.py
+++ b/lib/ansible/modules/network/avi/avi_webhook.py
@@ -122,5 +122,6 @@ def main():
return avi_ansible_api(module, 'webhook',
set([]))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/bigswitch/bigmon_policy.py b/lib/ansible/modules/network/bigswitch/bigmon_policy.py
index e3a288fb17..e125646bd9 100644
--- a/lib/ansible/modules/network/bigswitch/bigmon_policy.py
+++ b/lib/ansible/modules/network/bigswitch/bigmon_policy.py
@@ -183,5 +183,6 @@ def main():
except Exception as e:
module.fail_json(msg=to_native(e), exception=traceback.format_exc())
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cloudengine/ce_vrf_interface.py b/lib/ansible/modules/network/cloudengine/ce_vrf_interface.py
index 9e1dd54654..6bcaa21f0c 100644
--- a/lib/ansible/modules/network/cloudengine/ce_vrf_interface.py
+++ b/lib/ansible/modules/network/cloudengine/ce_vrf_interface.py
@@ -512,5 +512,6 @@ def main():
vrf_intf = VrfInterface(argument_spec)
vrf_intf.work()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_conditional_command.py b/lib/ansible/modules/network/cnos/cnos_conditional_command.py
index fc6b79a482..6c2bc1a4a0 100644
--- a/lib/ansible/modules/network/cnos/cnos_conditional_command.py
+++ b/lib/ansible/modules/network/cnos/cnos_conditional_command.py
@@ -188,5 +188,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_conditional_template.py b/lib/ansible/modules/network/cnos/cnos_conditional_template.py
index 1ffe6a4f90..781ce8810a 100644
--- a/lib/ansible/modules/network/cnos/cnos_conditional_template.py
+++ b/lib/ansible/modules/network/cnos/cnos_conditional_template.py
@@ -214,5 +214,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_factory.py b/lib/ansible/modules/network/cnos/cnos_factory.py
index 3b398c4534..9b56bfd827 100644
--- a/lib/ansible/modules/network/cnos/cnos_factory.py
+++ b/lib/ansible/modules/network/cnos/cnos_factory.py
@@ -149,5 +149,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_facts.py b/lib/ansible/modules/network/cnos/cnos_facts.py
index e450f1a287..5abcb23d15 100644
--- a/lib/ansible/modules/network/cnos/cnos_facts.py
+++ b/lib/ansible/modules/network/cnos/cnos_facts.py
@@ -511,6 +511,7 @@ class Interfaces(FactsBase):
parsed.append(line)
return parsed
+
FACT_SUBSETS = dict(
default=Default,
hardware=Hardware,
diff --git a/lib/ansible/modules/network/cnos/cnos_image.py b/lib/ansible/modules/network/cnos/cnos_image.py
index 6763351c8e..9dfa49fb89 100644
--- a/lib/ansible/modules/network/cnos/cnos_image.py
+++ b/lib/ansible/modules/network/cnos/cnos_image.py
@@ -220,5 +220,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_portchannel.py b/lib/ansible/modules/network/cnos/cnos_portchannel.py
index eef2a9a957..2f13355e49 100644
--- a/lib/ansible/modules/network/cnos/cnos_portchannel.py
+++ b/lib/ansible/modules/network/cnos/cnos_portchannel.py
@@ -432,5 +432,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_reload.py b/lib/ansible/modules/network/cnos/cnos_reload.py
index bcd9317c31..23468cfd93 100644
--- a/lib/ansible/modules/network/cnos/cnos_reload.py
+++ b/lib/ansible/modules/network/cnos/cnos_reload.py
@@ -148,5 +148,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_rollback.py b/lib/ansible/modules/network/cnos/cnos_rollback.py
index e838ae868c..27f691f939 100644
--- a/lib/ansible/modules/network/cnos/cnos_rollback.py
+++ b/lib/ansible/modules/network/cnos/cnos_rollback.py
@@ -272,5 +272,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_save.py b/lib/ansible/modules/network/cnos/cnos_save.py
index 0f48ad0c00..c612c0b16d 100644
--- a/lib/ansible/modules/network/cnos/cnos_save.py
+++ b/lib/ansible/modules/network/cnos/cnos_save.py
@@ -147,5 +147,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_showrun.py b/lib/ansible/modules/network/cnos/cnos_showrun.py
index b1bfd5379a..787d01f68e 100644
--- a/lib/ansible/modules/network/cnos/cnos_showrun.py
+++ b/lib/ansible/modules/network/cnos/cnos_showrun.py
@@ -145,5 +145,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_template.py b/lib/ansible/modules/network/cnos/cnos_template.py
index 50de026025..a942c0e6f2 100644
--- a/lib/ansible/modules/network/cnos/cnos_template.py
+++ b/lib/ansible/modules/network/cnos/cnos_template.py
@@ -185,5 +185,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/cnos/cnos_vlan.py b/lib/ansible/modules/network/cnos/cnos_vlan.py
index 31b7bde93d..4d1fd6dc7f 100644
--- a/lib/ansible/modules/network/cnos/cnos_vlan.py
+++ b/lib/ansible/modules/network/cnos/cnos_vlan.py
@@ -235,5 +235,6 @@ def main():
else:
module.fail_json(msg=errorMsg)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/dellos9/dellos9_config.py b/lib/ansible/modules/network/dellos9/dellos9_config.py
index e8195eea8e..63cf00797d 100644
--- a/lib/ansible/modules/network/dellos9/dellos9_config.py
+++ b/lib/ansible/modules/network/dellos9/dellos9_config.py
@@ -306,5 +306,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/enos/enos_facts.py b/lib/ansible/modules/network/enos/enos_facts.py
index c8bf758b97..4205656da2 100644
--- a/lib/ansible/modules/network/enos/enos_facts.py
+++ b/lib/ansible/modules/network/enos/enos_facts.py
@@ -422,6 +422,7 @@ class Interfaces(FactsBase):
parsed.append(line)
return parsed
+
FACT_SUBSETS = dict(
default=Default,
hardware=Hardware,
diff --git a/lib/ansible/modules/network/eos/eos_banner.py b/lib/ansible/modules/network/eos/eos_banner.py
index 18d12d5807..f14f08fa1e 100644
--- a/lib/ansible/modules/network/eos/eos_banner.py
+++ b/lib/ansible/modules/network/eos/eos_banner.py
@@ -195,5 +195,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/eos/eos_linkagg.py b/lib/ansible/modules/network/eos/eos_linkagg.py
index b60e8afd67..b0727c2581 100644
--- a/lib/ansible/modules/network/eos/eos_linkagg.py
+++ b/lib/ansible/modules/network/eos/eos_linkagg.py
@@ -344,5 +344,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/eos/eos_lldp.py b/lib/ansible/modules/network/eos/eos_lldp.py
index 19b76c2e92..b9fbf91e54 100644
--- a/lib/ansible/modules/network/eos/eos_lldp.py
+++ b/lib/ansible/modules/network/eos/eos_lldp.py
@@ -109,5 +109,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/eos/eos_static_route.py b/lib/ansible/modules/network/eos/eos_static_route.py
index 013a6804db..44a8f58a61 100644
--- a/lib/ansible/modules/network/eos/eos_static_route.py
+++ b/lib/ansible/modules/network/eos/eos_static_route.py
@@ -249,5 +249,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/eos/eos_system.py b/lib/ansible/modules/network/eos/eos_system.py
index 05b24fbd05..9d10393811 100644
--- a/lib/ansible/modules/network/eos/eos_system.py
+++ b/lib/ansible/modules/network/eos/eos_system.py
@@ -334,5 +334,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/eos/eos_user.py b/lib/ansible/modules/network/eos/eos_user.py
index 627c14c96c..a88b8f2ff6 100644
--- a/lib/ansible/modules/network/eos/eos_user.py
+++ b/lib/ansible/modules/network/eos/eos_user.py
@@ -403,5 +403,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/f5/bigip_asm_policy.py b/lib/ansible/modules/network/f5/bigip_asm_policy.py
index 32ca47f921..a6c53ac60d 100644
--- a/lib/ansible/modules/network/f5/bigip_asm_policy.py
+++ b/lib/ansible/modules/network/f5/bigip_asm_policy.py
@@ -853,5 +853,6 @@ def main():
cleanup_tokens(client)
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/f5/bigip_gtm_server.py b/lib/ansible/modules/network/f5/bigip_gtm_server.py
index 842aa801ad..66c311dba5 100644
--- a/lib/ansible/modules/network/f5/bigip_gtm_server.py
+++ b/lib/ansible/modules/network/f5/bigip_gtm_server.py
@@ -837,5 +837,6 @@ def main():
cleanup_tokens(client)
module.fail_json(msg=str(ex))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ios/ios_banner.py b/lib/ansible/modules/network/ios/ios_banner.py
index 8694813ce7..f7c63a909f 100644
--- a/lib/ansible/modules/network/ios/ios_banner.py
+++ b/lib/ansible/modules/network/ios/ios_banner.py
@@ -182,5 +182,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ios/ios_config.py b/lib/ansible/modules/network/ios/ios_config.py
index 6459025dc0..7f6865ab74 100644
--- a/lib/ansible/modules/network/ios/ios_config.py
+++ b/lib/ansible/modules/network/ios/ios_config.py
@@ -514,5 +514,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ios/ios_interface.py b/lib/ansible/modules/network/ios/ios_interface.py
index 93e42bc276..a12645d485 100644
--- a/lib/ansible/modules/network/ios/ios_interface.py
+++ b/lib/ansible/modules/network/ios/ios_interface.py
@@ -486,5 +486,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ios/ios_linkagg.py b/lib/ansible/modules/network/ios/ios_linkagg.py
index e07c18b0e5..e490cae88b 100644
--- a/lib/ansible/modules/network/ios/ios_linkagg.py
+++ b/lib/ansible/modules/network/ios/ios_linkagg.py
@@ -312,5 +312,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ios/ios_system.py b/lib/ansible/modules/network/ios/ios_system.py
index 0d59fe8121..44498b97ff 100644
--- a/lib/ansible/modules/network/ios/ios_system.py
+++ b/lib/ansible/modules/network/ios/ios_system.py
@@ -376,5 +376,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/ios/ios_user.py b/lib/ansible/modules/network/ios/ios_user.py
index 75bb2ec0e1..06f4f425a5 100644
--- a/lib/ansible/modules/network/ios/ios_user.py
+++ b/lib/ansible/modules/network/ios/ios_user.py
@@ -455,5 +455,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/iosxr/iosxr_command.py b/lib/ansible/modules/network/iosxr/iosxr_command.py
index 062abd3ae6..6adc7738f9 100644
--- a/lib/ansible/modules/network/iosxr/iosxr_command.py
+++ b/lib/ansible/modules/network/iosxr/iosxr_command.py
@@ -217,5 +217,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/iosxr/iosxr_logging.py b/lib/ansible/modules/network/iosxr/iosxr_logging.py
index e1645a9129..43540f5b98 100644
--- a/lib/ansible/modules/network/iosxr/iosxr_logging.py
+++ b/lib/ansible/modules/network/iosxr/iosxr_logging.py
@@ -721,5 +721,6 @@ def main():
result = config_object.run()
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/iosxr/iosxr_user.py b/lib/ansible/modules/network/iosxr/iosxr_user.py
index eb7693ccee..1eb69a35bc 100644
--- a/lib/ansible/modules/network/iosxr/iosxr_user.py
+++ b/lib/ansible/modules/network/iosxr/iosxr_user.py
@@ -703,5 +703,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/junos/junos_banner.py b/lib/ansible/modules/network/junos/junos_banner.py
index aac07c2d88..976bd68631 100644
--- a/lib/ansible/modules/network/junos/junos_banner.py
+++ b/lib/ansible/modules/network/junos/junos_banner.py
@@ -172,5 +172,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_command.py b/lib/ansible/modules/network/junos/junos_command.py
index 15575a9920..4352de9b97 100644
--- a/lib/ansible/modules/network/junos/junos_command.py
+++ b/lib/ansible/modules/network/junos/junos_command.py
@@ -446,5 +446,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/junos/junos_interface.py b/lib/ansible/modules/network/junos/junos_interface.py
index bd06f7170b..6c8ce9246f 100644
--- a/lib/ansible/modules/network/junos/junos_interface.py
+++ b/lib/ansible/modules/network/junos/junos_interface.py
@@ -382,5 +382,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_l3_interface.py b/lib/ansible/modules/network/junos/junos_l3_interface.py
index f4cf98721f..3b8d3935bd 100644
--- a/lib/ansible/modules/network/junos/junos_l3_interface.py
+++ b/lib/ansible/modules/network/junos/junos_l3_interface.py
@@ -196,5 +196,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_linkagg.py b/lib/ansible/modules/network/junos/junos_linkagg.py
index 7b251eb55f..91be5e0fd4 100644
--- a/lib/ansible/modules/network/junos/junos_linkagg.py
+++ b/lib/ansible/modules/network/junos/junos_linkagg.py
@@ -338,5 +338,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_lldp_interface.py b/lib/ansible/modules/network/junos/junos_lldp_interface.py
index 5e683c74f6..2da78c62f2 100644
--- a/lib/ansible/modules/network/junos/junos_lldp_interface.py
+++ b/lib/ansible/modules/network/junos/junos_lldp_interface.py
@@ -157,5 +157,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_logging.py b/lib/ansible/modules/network/junos/junos_logging.py
index 60fe0c52d4..3f99f749db 100644
--- a/lib/ansible/modules/network/junos/junos_logging.py
+++ b/lib/ansible/modules/network/junos/junos_logging.py
@@ -279,5 +279,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_static_route.py b/lib/ansible/modules/network/junos/junos_static_route.py
index e34dafd2c8..fbb1aa28f9 100644
--- a/lib/ansible/modules/network/junos/junos_static_route.py
+++ b/lib/ansible/modules/network/junos/junos_static_route.py
@@ -231,5 +231,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_system.py b/lib/ansible/modules/network/junos/junos_system.py
index f8f7b4f68e..638c655ca3 100644
--- a/lib/ansible/modules/network/junos/junos_system.py
+++ b/lib/ansible/modules/network/junos/junos_system.py
@@ -185,5 +185,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_user.py b/lib/ansible/modules/network/junos/junos_user.py
index 89033e043d..81015deced 100644
--- a/lib/ansible/modules/network/junos/junos_user.py
+++ b/lib/ansible/modules/network/junos/junos_user.py
@@ -336,5 +336,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_vlan.py b/lib/ansible/modules/network/junos/junos_vlan.py
index 89a622b183..404f63e5cf 100644
--- a/lib/ansible/modules/network/junos/junos_vlan.py
+++ b/lib/ansible/modules/network/junos/junos_vlan.py
@@ -219,5 +219,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/junos/junos_vrf.py b/lib/ansible/modules/network/junos/junos_vrf.py
index ef80edb637..1ea4acae6f 100644
--- a/lib/ansible/modules/network/junos/junos_vrf.py
+++ b/lib/ansible/modules/network/junos/junos_vrf.py
@@ -266,5 +266,6 @@ def main():
module.exit_json(**result)
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/network/netconf/netconf_get.py b/lib/ansible/modules/network/netconf/netconf_get.py
index a4b9050c80..823bd87aef 100644
--- a/lib/ansible/modules/network/netconf/netconf_get.py
+++ b/lib/ansible/modules/network/netconf/netconf_get.py
@@ -254,5 +254,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netconf/netconf_rpc.py b/lib/ansible/modules/network/netconf/netconf_rpc.py
index b1e013b3ab..bfeae9482f 100644
--- a/lib/ansible/modules/network/netconf/netconf_rpc.py
+++ b/lib/ansible/modules/network/netconf/netconf_rpc.py
@@ -258,5 +258,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_cluster.py b/lib/ansible/modules/network/netvisor/pn_cluster.py
index dada1d16dc..af326541ce 100644
--- a/lib/ansible/modules/network/netvisor/pn_cluster.py
+++ b/lib/ansible/modules/network/netvisor/pn_cluster.py
@@ -112,6 +112,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
NAME_EXISTS = None
NODE1_EXISTS = None
NODE2_EXISTS = None
@@ -310,8 +313,6 @@ def main():
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_ospf.py b/lib/ansible/modules/network/netvisor/pn_ospf.py
index 0bd698132c..d06badf16f 100644
--- a/lib/ansible/modules/network/netvisor/pn_ospf.py
+++ b/lib/ansible/modules/network/netvisor/pn_ospf.py
@@ -101,6 +101,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
VROUTER_EXISTS = None
NETWORK_EXISTS = None
@@ -287,8 +290,7 @@ def main():
% (command, vrouter_name, network_ip))
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_ospfarea.py b/lib/ansible/modules/network/netvisor/pn_ospfarea.py
index 34739d451d..8e10d38d12 100644
--- a/lib/ansible/modules/network/netvisor/pn_ospfarea.py
+++ b/lib/ansible/modules/network/netvisor/pn_ospfarea.py
@@ -116,6 +116,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
def get_command_from_state(state):
"""
@@ -214,8 +217,6 @@ def main():
changed=True
)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_show.py b/lib/ansible/modules/network/netvisor/pn_show.py
index 3fa956ebd4..db14c5ae36 100644
--- a/lib/ansible/modules/network/netvisor/pn_show.py
+++ b/lib/ansible/modules/network/netvisor/pn_show.py
@@ -97,6 +97,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
def pn_cli(module):
"""
@@ -192,8 +195,6 @@ def main():
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_trunk.py b/lib/ansible/modules/network/netvisor/pn_trunk.py
index a9065315cc..98e005a844 100644
--- a/lib/ansible/modules/network/netvisor/pn_trunk.py
+++ b/lib/ansible/modules/network/netvisor/pn_trunk.py
@@ -163,6 +163,9 @@ changed:
import shlex
+# Ansible boiler-plate
+from ansible.module_utils.basic import AnsibleModule
+
TRUNK_EXISTS = None
@@ -445,8 +448,6 @@ def main():
run_cli(module, cli)
-# Ansible boiler-plate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vlag.py b/lib/ansible/modules/network/netvisor/pn_vlag.py
index 47962d702c..67b3ba24e0 100644
--- a/lib/ansible/modules/network/netvisor/pn_vlag.py
+++ b/lib/ansible/modules/network/netvisor/pn_vlag.py
@@ -135,6 +135,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
VLAG_EXISTS = None
@@ -340,8 +343,6 @@ def main():
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vlan.py b/lib/ansible/modules/network/netvisor/pn_vlan.py
index b455a5b814..9c49256383 100644
--- a/lib/ansible/modules/network/netvisor/pn_vlan.py
+++ b/lib/ansible/modules/network/netvisor/pn_vlan.py
@@ -115,6 +115,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
VLAN_EXISTS = None
MAX_VLAN_ID = 4092
MIN_VLAN_ID = 2
@@ -305,8 +308,6 @@ def main():
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vrouter.py b/lib/ansible/modules/network/netvisor/pn_vrouter.py
index b5271b2c64..343e41d711 100644
--- a/lib/ansible/modules/network/netvisor/pn_vrouter.py
+++ b/lib/ansible/modules/network/netvisor/pn_vrouter.py
@@ -149,6 +149,9 @@ changed:
import shlex
+# AnsibleModule boilerplate
+from ansible.module_utils.basic import AnsibleModule
+
VROUTER_EXISTS = None
VROUTER_NAME_EXISTS = None
@@ -410,8 +413,6 @@ def main():
run_cli(module, cli)
-# AnsibleModule boilerplate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py b/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py
index ef3fe495d8..a8a33af28b 100644
--- a/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py
+++ b/lib/ansible/modules/network/netvisor/pn_vrouterbgp.py
@@ -162,6 +162,9 @@ changed:
import shlex
+# Ansible boiler-plate
+from ansible.module_utils.basic import AnsibleModule
+
VROUTER_EXISTS = None
NEIGHBOR_EXISTS = None
@@ -467,8 +470,7 @@ def main():
cli += ' route-map-out ' + route_mapout
run_cli(module, cli)
-# Ansible boiler-plate
-from ansible.module_utils.basic import AnsibleModule
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterif.py b/lib/ansible/modules/network/netvisor/pn_vrouterif.py
index 7f17778186..4f7f425158 100644
--- a/lib/ansible/modules/network/netvisor/pn_vrouterif.py
+++ b/lib/ansible/modules/network/netvisor/pn_vrouterif.py
@@ -161,6 +161,9 @@ changed:
import shlex
+# Ansible boiler-plate
+from ansible.module_utils.basic import AnsibleModule
+
VROUTER_EXISTS = None
INTERFACE_EXISTS = None
NIC_EXISTS = None
@@ -476,8 +479,7 @@ def main():
cli += ' %s vrouter-name %s nic %s ' % (command, vrouter_name, nic_str)
run_cli(module, cli)
-# Ansible boiler-plate
-from ansible.module_utils.basic import AnsibleModule
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py b/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py
index 94c55cb54d..d11c5981ad 100644
--- a/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py
+++ b/lib/ansible/modules/network/netvisor/pn_vrouterlbif.py
@@ -102,6 +102,9 @@ changed:
import shlex
+# Ansible boiler-plate
+from ansible.module_utils.basic import AnsibleModule
+
VROUTER_EXISTS = None
LB_INTERFACE_EXISTS = None
# Index range
@@ -321,8 +324,6 @@ def main():
run_cli(module, cli)
-# Ansible boiler-plate
-from ansible.module_utils.basic import AnsibleModule
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_file_copy.py b/lib/ansible/modules/network/nxos/nxos_file_copy.py
index 000da54a0d..5ee983476c 100644
--- a/lib/ansible/modules/network/nxos/nxos_file_copy.py
+++ b/lib/ansible/modules/network/nxos/nxos_file_copy.py
@@ -423,5 +423,6 @@ def main():
module.exit_json(**results)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py
index 93721e61e1..4e1160c1a2 100644
--- a/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py
+++ b/lib/ansible/modules/network/nxos/nxos_igmp_snooping.py
@@ -282,5 +282,6 @@ def main():
module.exit_json(**results)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_l3_interface.py b/lib/ansible/modules/network/nxos/nxos_l3_interface.py
index c34bb92683..8d1d1cb1f4 100644
--- a/lib/ansible/modules/network/nxos/nxos_l3_interface.py
+++ b/lib/ansible/modules/network/nxos/nxos_l3_interface.py
@@ -240,5 +240,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_linkagg.py b/lib/ansible/modules/network/nxos/nxos_linkagg.py
index f858945d95..af022dfc24 100644
--- a/lib/ansible/modules/network/nxos/nxos_linkagg.py
+++ b/lib/ansible/modules/network/nxos/nxos_linkagg.py
@@ -394,5 +394,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py
index 5cd96c702e..1a5289983f 100644
--- a/lib/ansible/modules/network/nxos/nxos_ntp_auth.py
+++ b/lib/ansible/modules/network/nxos/nxos_ntp_auth.py
@@ -318,5 +318,6 @@ def main():
module.exit_json(**results)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_nxapi.py b/lib/ansible/modules/network/nxos/nxos_nxapi.py
index 504edc40da..f212fc7d97 100644
--- a/lib/ansible/modules/network/nxos/nxos_nxapi.py
+++ b/lib/ansible/modules/network/nxos/nxos_nxapi.py
@@ -404,5 +404,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_reboot.py b/lib/ansible/modules/network/nxos/nxos_reboot.py
index cd79147fb7..a04e393913 100644
--- a/lib/ansible/modules/network/nxos/nxos_reboot.py
+++ b/lib/ansible/modules/network/nxos/nxos_reboot.py
@@ -89,5 +89,6 @@ def main():
module.exit_json(**results)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_snapshot.py b/lib/ansible/modules/network/nxos/nxos_snapshot.py
index 748f4ea094..ad21459c24 100644
--- a/lib/ansible/modules/network/nxos/nxos_snapshot.py
+++ b/lib/ansible/modules/network/nxos/nxos_snapshot.py
@@ -376,5 +376,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_static_route.py b/lib/ansible/modules/network/nxos/nxos_static_route.py
index 234e7452fd..7002d8b7c3 100644
--- a/lib/ansible/modules/network/nxos/nxos_static_route.py
+++ b/lib/ansible/modules/network/nxos/nxos_static_route.py
@@ -290,5 +290,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_system.py b/lib/ansible/modules/network/nxos/nxos_system.py
index b2db910515..c55b87b7c5 100644
--- a/lib/ansible/modules/network/nxos/nxos_system.py
+++ b/lib/ansible/modules/network/nxos/nxos_system.py
@@ -398,5 +398,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/nxos/nxos_user.py b/lib/ansible/modules/network/nxos/nxos_user.py
index 0c40f1f375..9c8de1e62c 100644
--- a/lib/ansible/modules/network/nxos/nxos_user.py
+++ b/lib/ansible/modules/network/nxos/nxos_user.py
@@ -376,5 +376,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/ordnance/ordnance_facts.py b/lib/ansible/modules/network/ordnance/ordnance_facts.py
index ae4742f192..11165f3126 100644
--- a/lib/ansible/modules/network/ordnance/ordnance_facts.py
+++ b/lib/ansible/modules/network/ordnance/ordnance_facts.py
@@ -216,6 +216,7 @@ class Interfaces(FactsBase):
if match:
return match.group(1)
+
FACT_SUBSETS = dict(
interfaces=Interfaces,
config=Config,
diff --git a/lib/ansible/modules/network/panos/panos_admin.py b/lib/ansible/modules/network/panos/panos_admin.py
index 399eae6a65..a629b3e923 100644
--- a/lib/ansible/modules/network/panos/panos_admin.py
+++ b/lib/ansible/modules/network/panos/panos_admin.py
@@ -186,5 +186,6 @@ def main():
module.exit_json(changed=changed, msg="okey dokey")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/panos/panos_admpwd.py b/lib/ansible/modules/network/panos/panos_admpwd.py
index 375df068b0..130acf5c4e 100644
--- a/lib/ansible/modules/network/panos/panos_admpwd.py
+++ b/lib/ansible/modules/network/panos/panos_admpwd.py
@@ -203,5 +203,6 @@ def main():
x = sys.exc_info()[1]
module.fail_json(msg=x)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/panos/panos_check.py b/lib/ansible/modules/network/panos/panos_check.py
index 396e84036d..00dba29b45 100644
--- a/lib/ansible/modules/network/panos/panos_check.py
+++ b/lib/ansible/modules/network/panos/panos_check.py
@@ -137,5 +137,6 @@ def main():
module.fail_json(msg="Timeout")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/panos/panos_commit.py b/lib/ansible/modules/network/panos/panos_commit.py
index ffc9964b3f..8c8447e2d9 100644
--- a/lib/ansible/modules/network/panos/panos_commit.py
+++ b/lib/ansible/modules/network/panos/panos_commit.py
@@ -117,5 +117,6 @@ def main():
module.exit_json(changed=True, msg="okey dokey")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/panos/panos_dag.py b/lib/ansible/modules/network/panos/panos_dag.py
index 3c16935571..6b7e0f90a7 100644
--- a/lib/ansible/modules/network/panos/panos_dag.py
+++ b/lib/ansible/modules/network/panos/panos_dag.py
@@ -135,5 +135,6 @@ def main():
module.exit_json(changed=changed, msg="okey dokey")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/panos/panos_lic.py b/lib/ansible/modules/network/panos/panos_lic.py
index 0ac7944566..070812e24c 100644
--- a/lib/ansible/modules/network/panos/panos_lic.py
+++ b/lib/ansible/modules/network/panos/panos_lic.py
@@ -162,5 +162,6 @@ def main():
module.exit_json(changed=True, msg="okey dokey")
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/radware/vdirect_commit.py b/lib/ansible/modules/network/radware/vdirect_commit.py
index fea5f87e83..29284baf83 100644
--- a/lib/ansible/modules/network/radware/vdirect_commit.py
+++ b/lib/ansible/modules/network/radware/vdirect_commit.py
@@ -337,5 +337,6 @@ def main():
except Exception as e:
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/radware/vdirect_file.py b/lib/ansible/modules/network/radware/vdirect_file.py
index 9808c7b94f..33388933df 100644
--- a/lib/ansible/modules/network/radware/vdirect_file.py
+++ b/lib/ansible/modules/network/radware/vdirect_file.py
@@ -238,5 +238,6 @@ def main():
except Exception as e:
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/radware/vdirect_runnable.py b/lib/ansible/modules/network/radware/vdirect_runnable.py
index 7372596298..c0d867f038 100644
--- a/lib/ansible/modules/network/radware/vdirect_runnable.py
+++ b/lib/ansible/modules/network/radware/vdirect_runnable.py
@@ -319,5 +319,6 @@ def main():
except Exception as e:
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/slxos/slxos_vlan.py b/lib/ansible/modules/network/slxos/slxos_vlan.py
index fa5c719d83..6594270eb6 100644
--- a/lib/ansible/modules/network/slxos/slxos_vlan.py
+++ b/lib/ansible/modules/network/slxos/slxos_vlan.py
@@ -306,5 +306,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_banner.py b/lib/ansible/modules/network/vyos/vyos_banner.py
index 19d55fd934..d2151c5f9d 100644
--- a/lib/ansible/modules/network/vyos/vyos_banner.py
+++ b/lib/ansible/modules/network/vyos/vyos_banner.py
@@ -173,5 +173,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_interface.py b/lib/ansible/modules/network/vyos/vyos_interface.py
index 78cc60fda4..a52d2eb422 100644
--- a/lib/ansible/modules/network/vyos/vyos_interface.py
+++ b/lib/ansible/modules/network/vyos/vyos_interface.py
@@ -428,5 +428,6 @@ def main():
module.fail_json(msg=msg, failed_conditions=failed_conditions)
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_l3_interface.py b/lib/ansible/modules/network/vyos/vyos_l3_interface.py
index 85c401f9d6..4d432e9267 100644
--- a/lib/ansible/modules/network/vyos/vyos_l3_interface.py
+++ b/lib/ansible/modules/network/vyos/vyos_l3_interface.py
@@ -280,5 +280,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_linkagg.py b/lib/ansible/modules/network/vyos/vyos_linkagg.py
index adab99380c..4cb19cad2a 100644
--- a/lib/ansible/modules/network/vyos/vyos_linkagg.py
+++ b/lib/ansible/modules/network/vyos/vyos_linkagg.py
@@ -260,5 +260,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_lldp.py b/lib/ansible/modules/network/vyos/vyos_lldp.py
index 712fe51dac..88159ea4c4 100644
--- a/lib/ansible/modules/network/vyos/vyos_lldp.py
+++ b/lib/ansible/modules/network/vyos/vyos_lldp.py
@@ -116,5 +116,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_lldp_interface.py b/lib/ansible/modules/network/vyos/vyos_lldp_interface.py
index 88f0c9546e..57503b92f9 100644
--- a/lib/ansible/modules/network/vyos/vyos_lldp_interface.py
+++ b/lib/ansible/modules/network/vyos/vyos_lldp_interface.py
@@ -223,5 +223,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_logging.py b/lib/ansible/modules/network/vyos/vyos_logging.py
index 90ce7d5089..6f4361d25b 100644
--- a/lib/ansible/modules/network/vyos/vyos_logging.py
+++ b/lib/ansible/modules/network/vyos/vyos_logging.py
@@ -258,5 +258,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_static_route.py b/lib/ansible/modules/network/vyos/vyos_static_route.py
index c09327d9fa..a41b0491fa 100644
--- a/lib/ansible/modules/network/vyos/vyos_static_route.py
+++ b/lib/ansible/modules/network/vyos/vyos_static_route.py
@@ -260,5 +260,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/network/vyos/vyos_user.py b/lib/ansible/modules/network/vyos/vyos_user.py
index e43b7ef95f..cc3668ca78 100644
--- a/lib/ansible/modules/network/vyos/vyos_user.py
+++ b/lib/ansible/modules/network/vyos/vyos_user.py
@@ -335,5 +335,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/notification/snow_record.py b/lib/ansible/modules/notification/snow_record.py
index 01ef58ad5b..e9208dc7d2 100644
--- a/lib/ansible/modules/notification/snow_record.py
+++ b/lib/ansible/modules/notification/snow_record.py
@@ -327,5 +327,6 @@ def run_module():
def main():
run_module()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/notification/syslogger.py b/lib/ansible/modules/notification/syslogger.py
index eb793b6fa4..1ec1c3493a 100644
--- a/lib/ansible/modules/notification/syslogger.py
+++ b/lib/ansible/modules/notification/syslogger.py
@@ -168,5 +168,6 @@ def run_module():
def main():
run_module()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/packaging/language/maven_artifact.py b/lib/ansible/modules/packaging/language/maven_artifact.py
index 02afe130b1..1d8d6f8c07 100644
--- a/lib/ansible/modules/packaging/language/maven_artifact.py
+++ b/lib/ansible/modules/packaging/language/maven_artifact.py
@@ -555,5 +555,6 @@ def main():
else:
module.exit_json(state=state, dest=dest, changed=changed)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/packaging/os/apt_rpm.py b/lib/ansible/modules/packaging/os/apt_rpm.py
index 76743d2e32..9c5e8e1d59 100644
--- a/lib/ansible/modules/packaging/os/apt_rpm.py
+++ b/lib/ansible/modules/packaging/os/apt_rpm.py
@@ -171,5 +171,6 @@ def main():
elif p['state'] in ['absent', 'removed']:
remove_packages(module, packages)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/packaging/os/openbsd_pkg.py b/lib/ansible/modules/packaging/os/openbsd_pkg.py
index feeed07614..d224f3977f 100644
--- a/lib/ansible/modules/packaging/os/openbsd_pkg.py
+++ b/lib/ansible/modules/packaging/os/openbsd_pkg.py
@@ -634,5 +634,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/packaging/os/zypper.py b/lib/ansible/modules/packaging/os/zypper.py
index 2f08b4c719..5c084a5723 100644
--- a/lib/ansible/modules/packaging/os/zypper.py
+++ b/lib/ansible/modules/packaging/os/zypper.py
@@ -198,6 +198,9 @@ from xml.dom.minidom import parseString as parseXML
from ansible.module_utils.six import iteritems
from ansible.module_utils._text import to_native
+# import module snippets
+from ansible.module_utils.basic import AnsibleModule
+
class Package:
def __init__(self, name, prefix, version):
@@ -522,7 +525,6 @@ def main():
module.exit_json(name=name, state=state, update_cache=update_cache, **retvals)
-# import module snippets
-from ansible.module_utils.basic import AnsibleModule
+
if __name__ == "__main__":
main()
diff --git a/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py b/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py
index 1c8b7a890b..1369575b87 100644
--- a/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py
+++ b/lib/ansible/modules/remote_management/hpilo/hpilo_facts.py
@@ -241,5 +241,6 @@ def main():
module.exit_json(ansible_facts=facts)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/remote_management/imc/imc_rest.py b/lib/ansible/modules/remote_management/imc/imc_rest.py
index 64774032af..e0cb231f46 100644
--- a/lib/ansible/modules/remote_management/imc/imc_rest.py
+++ b/lib/ansible/modules/remote_management/imc/imc_rest.py
@@ -422,5 +422,6 @@ def main():
result['elapsed'] = (datetime.datetime.utcnow() - start).seconds
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/remote_management/ipmi/ipmi_boot.py b/lib/ansible/modules/remote_management/ipmi/ipmi_boot.py
index 9b3a6c0dd8..ab1b72d1fa 100644
--- a/lib/ansible/modules/remote_management/ipmi/ipmi_boot.py
+++ b/lib/ansible/modules/remote_management/ipmi/ipmi_boot.py
@@ -182,5 +182,6 @@ def main():
except Exception as e:
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/remote_management/ipmi/ipmi_power.py b/lib/ansible/modules/remote_management/ipmi/ipmi_power.py
index 1d65cd62d9..c0336216bf 100644
--- a/lib/ansible/modules/remote_management/ipmi/ipmi_power.py
+++ b/lib/ansible/modules/remote_management/ipmi/ipmi_power.py
@@ -127,5 +127,6 @@ def main():
except Exception as e:
module.fail_json(msg=str(e))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/remote_management/redfish/redfish_facts.py b/lib/ansible/modules/remote_management/redfish/redfish_facts.py
index 074c7c1c9f..ac89ac9e67 100644
--- a/lib/ansible/modules/remote_management/redfish/redfish_facts.py
+++ b/lib/ansible/modules/remote_management/redfish/redfish_facts.py
@@ -262,5 +262,6 @@ def main():
# Return data back
module.exit_json(ansible_facts=dict(redfish_facts=result))
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/source_control/gitlab_deploy_key.py b/lib/ansible/modules/source_control/gitlab_deploy_key.py
index e71a52bd20..eae4ac2fd1 100644
--- a/lib/ansible/modules/source_control/gitlab_deploy_key.py
+++ b/lib/ansible/modules/source_control/gitlab_deploy_key.py
@@ -229,5 +229,6 @@ def main():
else:
module.fail_json(msg='Failure', error=response)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/source_control/gitlab_hooks.py b/lib/ansible/modules/source_control/gitlab_hooks.py
index 7e17b8ea85..07f066577f 100644
--- a/lib/ansible/modules/source_control/gitlab_hooks.py
+++ b/lib/ansible/modules/source_control/gitlab_hooks.py
@@ -296,5 +296,6 @@ def main():
else:
module.fail_json(msg='Failure', error=response)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_cdot_license.py b/lib/ansible/modules/storage/netapp/na_cdot_license.py
index 7f432bdeab..82a16b0a04 100644
--- a/lib/ansible/modules/storage/netapp/na_cdot_license.py
+++ b/lib/ansible/modules/storage/netapp/na_cdot_license.py
@@ -289,5 +289,6 @@ def main():
v = NetAppCDOTLicense()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_cdot_svm.py b/lib/ansible/modules/storage/netapp/na_cdot_svm.py
index 3eff715971..6f9b38ae7e 100644
--- a/lib/ansible/modules/storage/netapp/na_cdot_svm.py
+++ b/lib/ansible/modules/storage/netapp/na_cdot_svm.py
@@ -241,5 +241,6 @@ def main():
v = NetAppCDOTSVM()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_cdot_user.py b/lib/ansible/modules/storage/netapp/na_cdot_user.py
index d635e54866..bbfe002811 100644
--- a/lib/ansible/modules/storage/netapp/na_cdot_user.py
+++ b/lib/ansible/modules/storage/netapp/na_cdot_user.py
@@ -296,5 +296,6 @@ def main():
v = NetAppCDOTUser()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_cdot_user_role.py b/lib/ansible/modules/storage/netapp/na_cdot_user_role.py
index a4d82ceb0a..93bef8d95c 100644
--- a/lib/ansible/modules/storage/netapp/na_cdot_user_role.py
+++ b/lib/ansible/modules/storage/netapp/na_cdot_user_role.py
@@ -222,5 +222,6 @@ def main():
v = NetAppCDOTUserRole()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_cdot_volume.py b/lib/ansible/modules/storage/netapp/na_cdot_volume.py
index 458fa54af9..337303b3af 100644
--- a/lib/ansible/modules/storage/netapp/na_cdot_volume.py
+++ b/lib/ansible/modules/storage/netapp/na_cdot_volume.py
@@ -435,5 +435,6 @@ def main():
v = NetAppCDOTVolume()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/na_ontap_broadcast_domain.py b/lib/ansible/modules/storage/netapp/na_ontap_broadcast_domain.py
index 9181082549..ad11ae2e6c 100644
--- a/lib/ansible/modules/storage/netapp/na_ontap_broadcast_domain.py
+++ b/lib/ansible/modules/storage/netapp/na_ontap_broadcast_domain.py
@@ -249,5 +249,6 @@ def main():
obj = NetAppOntapBroadcastDomain()
obj.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/sf_account_manager.py b/lib/ansible/modules/storage/netapp/sf_account_manager.py
index 84e755e522..5d75ea5528 100644
--- a/lib/ansible/modules/storage/netapp/sf_account_manager.py
+++ b/lib/ansible/modules/storage/netapp/sf_account_manager.py
@@ -260,5 +260,6 @@ def main():
v = SolidFireAccount()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/sf_check_connections.py b/lib/ansible/modules/storage/netapp/sf_check_connections.py
index 419327c648..093bf38276 100644
--- a/lib/ansible/modules/storage/netapp/sf_check_connections.py
+++ b/lib/ansible/modules/storage/netapp/sf_check_connections.py
@@ -176,5 +176,6 @@ def main():
v = SolidFireConnection()
v.check()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py b/lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
index e609188827..a73eeaae5c 100644
--- a/lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
+++ b/lib/ansible/modules/storage/netapp/sf_snapshot_schedule_manager.py
@@ -381,5 +381,6 @@ def main():
v = SolidFireSnapShotSchedule()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py b/lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py
index ca9646f724..4f4da5edfd 100644
--- a/lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py
+++ b/lib/ansible/modules/storage/netapp/sf_volume_access_group_manager.py
@@ -241,5 +241,6 @@ def main():
v = SolidFireVolumeAccessGroup()
v.apply()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/purestorage/purefa_ds.py b/lib/ansible/modules/storage/purestorage/purefa_ds.py
index ecd313a63d..1e326fb28b 100644
--- a/lib/ansible/modules/storage/purestorage/purefa_ds.py
+++ b/lib/ansible/modules/storage/purestorage/purefa_ds.py
@@ -263,5 +263,6 @@ def main():
else:
module.exit_json(changed=False)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/purestorage/purefa_facts.py b/lib/ansible/modules/storage/purestorage/purefa_facts.py
index 8e1709b241..f96319e5aa 100644
--- a/lib/ansible/modules/storage/purestorage/purefa_facts.py
+++ b/lib/ansible/modules/storage/purestorage/purefa_facts.py
@@ -574,5 +574,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/storage/purestorage/purefa_hg.py b/lib/ansible/modules/storage/purestorage/purefa_hg.py
index e5784b19d0..983a887765 100644
--- a/lib/ansible/modules/storage/purestorage/purefa_hg.py
+++ b/lib/ansible/modules/storage/purestorage/purefa_hg.py
@@ -254,5 +254,6 @@ def main():
else:
make_hostgroup(module, array)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/aix_inittab.py b/lib/ansible/modules/system/aix_inittab.py
index 5705be5734..165ebbb8b7 100644
--- a/lib/ansible/modules/system/aix_inittab.py
+++ b/lib/ansible/modules/system/aix_inittab.py
@@ -237,5 +237,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/alternatives.py b/lib/ansible/modules/system/alternatives.py
index 3c1df4064f..7b49447f58 100644
--- a/lib/ansible/modules/system/alternatives.py
+++ b/lib/ansible/modules/system/alternatives.py
@@ -160,5 +160,6 @@ def main():
else:
module.exit_json(changed=False)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/awall.py b/lib/ansible/modules/system/awall.py
index 3108b75f94..818e41bb4c 100644
--- a/lib/ansible/modules/system/awall.py
+++ b/lib/ansible/modules/system/awall.py
@@ -148,6 +148,6 @@ def main():
module.fail_json(msg="no action defined")
-# import module snippets
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/dconf.py b/lib/ansible/modules/system/dconf.py
index 3526818e84..c5cda633d7 100644
--- a/lib/ansible/modules/system/dconf.py
+++ b/lib/ansible/modules/system/dconf.py
@@ -370,5 +370,6 @@ def main():
changed = dconf.reset(module.params['key'])
module.exit_json(changed=changed)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/nosh.py b/lib/ansible/modules/system/nosh.py
index a9f50f3b6a..0dc3c38b05 100644
--- a/lib/ansible/modules/system/nosh.py
+++ b/lib/ansible/modules/system/nosh.py
@@ -414,5 +414,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/pamd.py b/lib/ansible/modules/system/pamd.py
index 59add7fb65..161f2e6f50 100644
--- a/lib/ansible/modules/system/pamd.py
+++ b/lib/ansible/modules/system/pamd.py
@@ -796,5 +796,6 @@ def main():
module.exit_json(changed=changes > 0, ansible_facts=facts)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/system/vdo.py b/lib/ansible/modules/system/vdo.py
index 716893de8f..900c4d73b6 100644
--- a/lib/ansible/modules/system/vdo.py
+++ b/lib/ansible/modules/system/vdo.py
@@ -868,5 +868,6 @@ def run_module():
def main():
run_module()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py b/lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py
index 88acb22b1d..8ccebd8111 100644
--- a/lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py
+++ b/lib/ansible/modules/web_infrastructure/apache2_mod_proxy.py
@@ -431,6 +431,7 @@ def main():
else:
module.fail_json(msg=str(module.params['member_host']) + ' is not a member of the balancer ' + str(module.params['balancer_vhost']) + '!')
+
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.urls import fetch_url
if __name__ == '__main__':
diff --git a/lib/ansible/modules/web_infrastructure/apache2_module.py b/lib/ansible/modules/web_infrastructure/apache2_module.py
index cdbfe98850..c09fafc55a 100644
--- a/lib/ansible/modules/web_infrastructure/apache2_module.py
+++ b/lib/ansible/modules/web_infrastructure/apache2_module.py
@@ -108,6 +108,9 @@ stderr:
import re
+# import module snippets
+from ansible.module_utils.basic import AnsibleModule
+
def _run_threaded(module):
control_binary = _get_ctl_binary(module)
@@ -259,7 +262,6 @@ def main():
if module.params['state'] in ['present', 'absent']:
_set_state(module, module.params['state'])
-# import module snippets
-from ansible.module_utils.basic import AnsibleModule
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/web_infrastructure/gunicorn.py b/lib/ansible/modules/web_infrastructure/gunicorn.py
index b209c144a6..f6a829dc40 100644
--- a/lib/ansible/modules/web_infrastructure/gunicorn.py
+++ b/lib/ansible/modules/web_infrastructure/gunicorn.py
@@ -223,5 +223,6 @@ def main():
else:
module.fail_json(msg='Failed to start gunicorn {0}'.format(err), error=err)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/web_infrastructure/jboss.py b/lib/ansible/modules/web_infrastructure/jboss.py
index a74a7f6e49..1629ab1bed 100644
--- a/lib/ansible/modules/web_infrastructure/jboss.py
+++ b/lib/ansible/modules/web_infrastructure/jboss.py
@@ -143,5 +143,6 @@ def main():
module.exit_json(**result)
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/web_infrastructure/jira.py b/lib/ansible/modules/web_infrastructure/jira.py
index 9d84bb7ee5..fcdfb73a30 100644
--- a/lib/ansible/modules/web_infrastructure/jira.py
+++ b/lib/ansible/modules/web_infrastructure/jira.py
@@ -367,6 +367,7 @@ def link(restbase, user, passwd, params):
return ret
+
# Some parameters are required depending on the operation:
OP_REQUIRED = dict(create=['project', 'issuetype', 'summary', 'description'],
comment=['issue', 'comment'],
diff --git a/lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py b/lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py
index ac912b77fe..70f79df3ab 100644
--- a/lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py
+++ b/lib/ansible/modules/web_infrastructure/rundeck_acl_policy.py
@@ -220,5 +220,6 @@ def main():
elif module.params['state'] == 'absent':
rundeck.remove_acl()
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/modules/web_infrastructure/supervisorctl.py b/lib/ansible/modules/web_infrastructure/supervisorctl.py
index b1755d67e2..edacfe39ce 100644
--- a/lib/ansible/modules/web_infrastructure/supervisorctl.py
+++ b/lib/ansible/modules/web_infrastructure/supervisorctl.py
@@ -236,5 +236,6 @@ def main():
module.fail_json(name=name, msg="ERROR (no such process)")
take_action_on_processes(processes, lambda s: s in ('RUNNING', 'STARTING'), 'stop', 'stopped')
+
if __name__ == '__main__':
main()
diff --git a/lib/ansible/parsing/yaml/dumper.py b/lib/ansible/parsing/yaml/dumper.py
index 155d42986c..df3627d99f 100644
--- a/lib/ansible/parsing/yaml/dumper.py
+++ b/lib/ansible/parsing/yaml/dumper.py
@@ -43,6 +43,7 @@ def represent_hostvars(self, data):
def represent_vault_encrypted_unicode(self, data):
return self.represent_scalar(u'!vault', data._ciphertext.decode(), style='|')
+
if PY3:
represent_unicode = yaml.representer.SafeRepresenter.represent_str
else:
diff --git a/lib/ansible/plugins/callback/dense.py b/lib/ansible/plugins/callback/dense.py
index f055802a02..fc752fe50c 100644
--- a/lib/ansible/plugins/callback/dense.py
+++ b/lib/ansible/plugins/callback/dense.py
@@ -493,6 +493,7 @@ class CallbackModule_dense(CallbackModule_default):
screen_only=True
)
+
# When using -vv or higher, simply do the default action
if display.verbosity >= 2 or not HAS_OD:
CallbackModule = CallbackModule_default
diff --git a/lib/ansible/plugins/filter/ipaddr.py b/lib/ansible/plugins/filter/ipaddr.py
index fe3c3dbdf7..b12101e8e1 100644
--- a/lib/ansible/plugins/filter/ipaddr.py
+++ b/lib/ansible/plugins/filter/ipaddr.py
@@ -176,6 +176,7 @@ def _ip_netmask_query(v):
if v.ip != v.network:
return str(v.ip) + ' ' + str(v.netmask)
+
'''
def _ip_wildcard_query(v):
if v.size == 2:
diff --git a/lib/ansible/plugins/inventory/scaleway.py b/lib/ansible/plugins/inventory/scaleway.py
index 17670dd2ea..e84d00135d 100644
--- a/lib/ansible/plugins/inventory/scaleway.py
+++ b/lib/ansible/plugins/inventory/scaleway.py
@@ -142,6 +142,7 @@ def extract_zone(server_info):
except (KeyError, TypeError):
return None
+
extractors = {
"public_ipv4": extract_public_ipv4,
"private_ipv4": extract_private_ipv4,
diff --git a/lib/ansible/utils/hashing.py b/lib/ansible/utils/hashing.py
index 3c5b125b0b..11e58444fd 100644
--- a/lib/ansible/utils/hashing.py
+++ b/lib/ansible/utils/hashing.py
@@ -69,6 +69,7 @@ def secure_hash(filename, hash_func=sha1):
raise AnsibleError("error while accessing the file %s, error was: %s" % (filename, e))
return digest.hexdigest()
+
# The checksum algorithm must match with the algorithm in ShellModule.checksum() method
checksum = secure_hash
checksum_s = secure_hash_s
diff --git a/packaging/release/versionhelper/version_helper.py b/packaging/release/versionhelper/version_helper.py
index fab4dbb3f3..163494b6ae 100644
--- a/packaging/release/versionhelper/version_helper.py
+++ b/packaging/release/versionhelper/version_helper.py
@@ -190,5 +190,6 @@ def main():
for propname in props:
print('{0}: {1}'.format(propname, getattr(v, propname)))
+
if __name__ == '__main__':
main()
diff --git a/test/integration/targets/async/library/async_test.py b/test/integration/targets/async/library/async_test.py
index e4093bcb30..3098bc601c 100644
--- a/test/integration/targets/async/library/async_test.py
+++ b/test/integration/targets/async/library/async_test.py
@@ -39,4 +39,5 @@ def main():
if 'trailing_junk' in fail_mode:
print("trailing junk after module output")
+
main()
diff --git a/test/integration/targets/async_fail/library/async_test.py b/test/integration/targets/async_fail/library/async_test.py
index 873f7e7881..838f2f07ea 100644
--- a/test/integration/targets/async_fail/library/async_test.py
+++ b/test/integration/targets/async_fail/library/async_test.py
@@ -46,4 +46,5 @@ def main():
if 'trailing_junk' in fail_mode:
print("trailing junk after module output")
+
main()
diff --git a/test/integration/targets/var_precedence/ansible-var-precedence-check.py b/test/integration/targets/var_precedence/ansible-var-precedence-check.py
index 375d87dfc5..f19cd1c5ef 100755
--- a/test/integration/targets/var_precedence/ansible-var-precedence-check.py
+++ b/test/integration/targets/var_precedence/ansible-var-precedence-check.py
@@ -536,5 +536,6 @@ def main():
shutil.rmtree(TESTDIR)
index += 1
+
if __name__ == "__main__":
main()
diff --git a/test/legacy/cleanup_gce.py b/test/legacy/cleanup_gce.py
index bb6f4e879c..f98798a670 100644
--- a/test/legacy/cleanup_gce.py
+++ b/test/legacy/cleanup_gce.py
@@ -69,6 +69,7 @@ def parse_args():
gce_credentials.check_required(opts, parser)
return (opts, args)
+
if __name__ == '__main__':
(opts, args) = parse_args()
diff --git a/test/units/module_utils/network/aci/test_aci.py b/test/units/module_utils/network/aci/test_aci.py
index 99957d3b24..1e8c14f4a4 100644
--- a/test/units/module_utils/network/aci/test_aci.py
+++ b/test/units/module_utils/network/aci/test_aci.py
@@ -43,6 +43,7 @@ class AltACIModule(ACIModule):
self.module = AltModule
self.params = self.module.params
+
aci = AltACIModule()
diff --git a/test/units/module_utils/network/common/test_parsing.py b/test/units/module_utils/network/common/test_parsing.py
index b19fa9bd11..7dcbea51f7 100644
--- a/test/units/module_utils/network/common/test_parsing.py
+++ b/test/units/module_utils/network/common/test_parsing.py
@@ -41,5 +41,6 @@ class TestNotKeyword(unittest.TestCase):
def test_conditionals_w_not_keyword(self):
assert c1(test_results) and c2(test_results) and c3(test_results)
+
if __name__ == '__main__':
unittest.main()
diff --git a/test/units/modules/network/nxos/nxos_module.py b/test/units/modules/network/nxos/nxos_module.py
index 1948cfc0aa..342ec550d0 100644
--- a/test/units/modules/network/nxos/nxos_module.py
+++ b/test/units/modules/network/nxos/nxos_module.py
@@ -32,6 +32,7 @@ def set_module_args(args):
return _set_module_args(args)
+
fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
fixture_data = {}
diff --git a/test/units/plugins/connection/test_connection.py b/test/units/plugins/connection/test_connection.py
index ea5f540fcd..a2f8965579 100644
--- a/test/units/plugins/connection/test_connection.py
+++ b/test/units/plugins/connection/test_connection.py
@@ -54,6 +54,7 @@ def import_mock(name, *args):
return mock_ncclient
return builtin_import(name, *args)
+
if PY3:
with patch('builtins.__import__', side_effect=import_mock):
from ansible.plugins.connection.netconf import Connection as NetconfConnection
diff --git a/test/units/plugins/connection/test_netconf.py b/test/units/plugins/connection/test_netconf.py
index bed851b747..850bf8898a 100644
--- a/test/units/plugins/connection/test_netconf.py
+++ b/test/units/plugins/connection/test_netconf.py
@@ -43,6 +43,7 @@ def import_mock(name, *args):
return mock_ncclient
return builtin_import(name, *args)
+
if PY3:
with patch('builtins.__import__', side_effect=import_mock):
from ansible.plugins.connection import netconf