bundles: code style improvements
All checks were successful
bundlewrap/pipeline/head This commit looks good
All checks were successful
bundlewrap/pipeline/head This commit looks good
This commit is contained in:
parent
2af911c29f
commit
f52df58517
24 changed files with 80 additions and 95 deletions
|
@ -171,7 +171,4 @@ if node.metadata['powerdns'].get('features', {}).get('pgsql', False):
|
|||
'needed_by': {
|
||||
'svc_systemd:pdns',
|
||||
},
|
||||
'needed_by': {
|
||||
'svc_systemd:pdns',
|
||||
},
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
from bundlewrap.exceptions import NoSuchGroup
|
||||
|
||||
defaults = {
|
||||
'apt': {
|
||||
'packages': {
|
||||
|
@ -68,7 +66,7 @@ def get_ips_of_secondary_nameservers(metadata):
|
|||
ips = set()
|
||||
for rnode in repo.nodes_in_group('dns'):
|
||||
if rnode.metadata.get('powerdns/is_secondary', False):
|
||||
for identifier, found_ips in repo.libs.tools.resolve_identifier(repo, rnode.name).items():
|
||||
for _, found_ips in repo.libs.tools.resolve_identifier(repo, rnode.name).items():
|
||||
ips.update({str(ip) for ip in found_ips})
|
||||
|
||||
return {
|
||||
|
@ -87,7 +85,7 @@ def get_ips_of_primary_nameservers(metadata):
|
|||
ips = set()
|
||||
for rnode in repo.nodes_in_group('dns'):
|
||||
if not rnode.metadata.get('powerdns/is_secondary', False):
|
||||
for identifier, found_ips in repo.libs.tools.resolve_identifier(repo, rnode.name).items():
|
||||
for _, found_ips in repo.libs.tools.resolve_identifier(repo, rnode.name).items():
|
||||
ips.update({str(ip) for ip in found_ips})
|
||||
|
||||
return {
|
||||
|
@ -121,7 +119,7 @@ def generate_dns_entries_for_nodes(metadata):
|
|||
|
||||
# We're doing this once again to get the nodes which only have
|
||||
# private ips.
|
||||
if not ip4 and len(found_ips['ipv4']):
|
||||
if not ip4 and found_ips['ipv4']:
|
||||
ip4 = sorted(found_ips['ipv4'])[0]
|
||||
|
||||
if ip4:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue