From 3c3102e21a7d3e5b5c19fcd4702f4cc80416efc3 Mon Sep 17 00:00:00 2001 From: Dimitri Savineau Date: Fri, 25 Oct 2019 15:52:27 -0400 Subject: [PATCH] ipaddrs_in_ranges: fix python indent pycodestyle returns: E111 indentation is not a multiple of four Signed-off-by: Dimitri Savineau (cherry picked from commit 8a0a13f67a56bd3c1eb1078892456cdb692b0fcb) --- plugins/filter/ipaddrs_in_ranges.py | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/filter/ipaddrs_in_ranges.py b/plugins/filter/ipaddrs_in_ranges.py index 1073e7e84..92971fad7 100644 --- a/plugins/filter/ipaddrs_in_ranges.py +++ b/plugins/filter/ipaddrs_in_ranges.py @@ -8,23 +8,23 @@ except ImportError: class FilterModule(object): - ''' IP addresses within IP ranges ''' + ''' IP addresses within IP ranges ''' - def ips_in_ranges(self, ip_addresses, ip_ranges): - ips_in_ranges = list() - for ip_addr in ip_addresses: - for ip_range in ip_ranges: - if netaddr.IPAddress(ip_addr) in netaddr.IPNetwork(ip_range): - ips_in_ranges.append(ip_addr) - return ips_in_ranges + def ips_in_ranges(self, ip_addresses, ip_ranges): + ips_in_ranges = list() + for ip_addr in ip_addresses: + for ip_range in ip_ranges: + if netaddr.IPAddress(ip_addr) in netaddr.IPNetwork(ip_range): + ips_in_ranges.append(ip_addr) + return ips_in_ranges - def filters(self): - if netaddr: - return { - 'ips_in_ranges': self.ips_in_ranges - } - else: - # Need to install python's netaddr for these filters to work - raise errors.AnsibleFilterError( - "The ips_in_ranges filter requires python's netaddr be " - "installed on the ansible controller.") + def filters(self): + if netaddr: + return { + 'ips_in_ranges': self.ips_in_ranges + } + else: + # Need to install python's netaddr for these filters to work + raise errors.AnsibleFilterError( + "The ips_in_ranges filter requires python's netaddr be " + "installed on the ansible controller.")