diff options
author | Matt Martz <matt@sivel.net> | 2017-05-09 23:38:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-09 23:38:08 +0200 |
commit | d3249e7875533d5d05351a19543d5fbc1c957cc9 (patch) | |
tree | 1774f344fed2799f15c606edf405b387e6d00909 /contrib/inventory/cobbler.py | |
parent | [cloud][inventory] Get tags for RDS instances. (#23989) (diff) | |
download | ansible-d3249e7875533d5d05351a19543d5fbc1c957cc9.tar.xz ansible-d3249e7875533d5d05351a19543d5fbc1c957cc9.zip |
pep8 fixes for contrib (#24344)
Diffstat (limited to 'contrib/inventory/cobbler.py')
-rwxr-xr-x | contrib/inventory/cobbler.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/inventory/cobbler.py b/contrib/inventory/cobbler.py index 89f9bf75b3..5b18cdd269 100755 --- a/contrib/inventory/cobbler.py +++ b/contrib/inventory/cobbler.py @@ -110,9 +110,9 @@ class CobblerInventory(object): if self.args.host: data_to_print += self.get_host_info() else: - self.inventory['_meta'] = { 'hostvars': {} } + self.inventory['_meta'] = {'hostvars': {}} for hostname in self.cache: - self.inventory['_meta']['hostvars'][hostname] = {'cobbler': self.cache[hostname] } + self.inventory['_meta']['hostvars'][hostname] = {'cobbler': self.cache[hostname]} data_to_print += self.json_format_dict(self.inventory, True) print(data_to_print) @@ -179,7 +179,7 @@ class CobblerInventory(object): for host in data: # Get the FQDN for the host and add it to the right groups - dns_name = host['hostname'] #None + dns_name = host['hostname'] # None ksmeta = None interfaces = host['interfaces'] # hostname is often empty for non-static IP hosts @@ -229,11 +229,11 @@ class CobblerInventory(object): # Need to load index from cache self.load_cache_from_cache() - if not self.args.host in self.cache: + if self.args.host not in self.cache: # try updating the cache self.update_cache() - if not self.args.host in self.cache: + if self.args.host not in self.cache: # host might not exist anymore return self.json_format_dict({}, True) |