diff options
author | Joren Vrancken <jorenvrancken@gmail.com> | 2018-07-29 13:46:06 +0200 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2018-07-31 12:06:56 -0700 |
commit | b954917761eba2ddcdc8cf9dc811d668f7728eff (patch) | |
tree | b19d2d148901a088479cfaa9ad5b439f7159be7a /contrib | |
parent | 9e310558ee259515b52e57997778fd7d6ffe9fcd (diff) | |
download | ansible-b954917761eba2ddcdc8cf9dc811d668f7728eff.tar.gz |
Surround top-level function and class definitions with two blank lines.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/inventory/apache-libcloud.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/apstra_aos.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/cloudforms.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/cobbler.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/consul_io.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/docker.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/foreman.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/gce.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/lxc_inventory.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/mdt_dynamic_inventory.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/nagios_livestatus.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/nagios_ndo.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/nsot.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/ovirt.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/ovirt4.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/rax.py | 2 | ||||
-rwxr-xr-x | contrib/inventory/rudder.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/softlayer.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/vbox.py | 1 | ||||
-rwxr-xr-x | contrib/inventory/zabbix.py | 1 |
20 files changed, 20 insertions, 1 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() |