summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan <careyrp@users.noreply.github.com>2014-03-11 16:59:13 -0400
committerMichael DeHaan <michael.dehaan@gmail.com>2014-03-12 16:03:12 -0400
commit72c7841c572bba32b2e96655ae30c2d0577fab46 (patch)
tree2537d6873e34fc4d18c8ab0ff269837e63534adf
parent42ca3d80762b780923ecbec4c2f6e0835a74bb75 (diff)
downloadansible-72c7841c572bba32b2e96655ae30c2d0577fab46.tar.gz
add module param to Network & sub-classes
add module param to Network and sub-classes of Network, so that ansible 1.5.1 changes to LinuxNetwork apply to all Network classes.
-rw-r--r--library/system/setup12
1 files changed, 6 insertions, 6 deletions
diff --git a/library/system/setup b/library/system/setup
index 1c156f6ce3..0794250474 100644
--- a/library/system/setup
+++ b/library/system/setup
@@ -1413,7 +1413,8 @@ class Network(Facts):
subclass = sc
return super(cls, subclass).__new__(subclass, *arguments, **keyword)
- def __init__(self):
+ def __init__(self, module):
+ self.module = module
Facts.__init__(self)
def populate(self):
@@ -1430,11 +1431,10 @@ class LinuxNetwork(Network):
platform = 'Linux'
def __init__(self, module):
- self.module = module
- Network.__init__(self)
+ Network.__init__(self, module)
def populate(self):
- ip_path = module.get_bin_path('ip')
+ ip_path = self.module.get_bin_path('ip')
if ip_path is None:
return self.facts
default_ipv4, default_ipv6 = self.get_default_interfaces(ip_path)
@@ -1650,8 +1650,8 @@ class GenericBsdIfconfigNetwork(Network):
"""
platform = 'Generic_BSD_Ifconfig'
- def __init__(self):
- Network.__init__(self)
+ def __init__(self, module):
+ Network.__init__(self, module)
def populate(self):