diff --git a/pyexecplugins/Ansible.py b/pyexecplugins/Ansible.py index 17288f2..db1176b 100644 --- a/pyexecplugins/Ansible.py +++ b/pyexecplugins/Ansible.py @@ -54,8 +54,8 @@ class Ansible(PyExecPlugin): "ownerEmail" : "m.lettere@gmail.com" } - def __init__(self, data=None): - super().__init__(data) + def __init__(self, data=None, config=None): + super().__init__(data, config) self.playbook = self.data.get("playbook") self.hosts = self.data.get("hosts", ["localhost"]) self.connection = self.data.get("connection","local") diff --git a/pyexecplugins/Eval.py b/pyexecplugins/Eval.py index 7537cd1..ea02a15 100644 --- a/pyexecplugins/Eval.py +++ b/pyexecplugins/Eval.py @@ -11,8 +11,8 @@ class Plugin(PyExecPlugin): "ownerEmail" : "m.lettere@gmail.com" } - def __init__(self, data=None): - super().__init__(data) + def __init__(self, data=None, config=None): + super().__init__(data, config) def execute(self): code = self.data.get("code") diff --git a/pyexecplugins/Http.py b/pyexecplugins/Http.py index c3401b8..fc1c7dd 100644 --- a/pyexecplugins/Http.py +++ b/pyexecplugins/Http.py @@ -14,8 +14,8 @@ class Plugin(PyExecPlugin): "ownerEmail" : "m.lettere@gmail.com" } - def __init__(self, data): - super().__init__(data) + def __init__(self, data, config=None): + super().__init__(data, config) self.method = data.get("method") or "get" self.url = data.get("url") self.headers = data.get("headers") or {} diff --git a/pyexecplugins/Packer.py b/pyexecplugins/Packer.py index f362781..eb478fe 100644 --- a/pyexecplugins/Packer.py +++ b/pyexecplugins/Packer.py @@ -17,8 +17,8 @@ class Plugin(PyExecPlugin): "ownerEmail" : "m.lettere@gmail.com" } - def __init__(self, data=None): - super().__init__(data) + def __init__(self, data=None, config=None): + super().__init__(data, config) self.template = data["template"] self.command = data.get("command", "build") self.extra_vars = data.get("extra_vars", {}) diff --git a/pyexecplugins/Shell.py b/pyexecplugins/Shell.py index 28b08ff..dc9f74c 100644 --- a/pyexecplugins/Shell.py +++ b/pyexecplugins/Shell.py @@ -14,8 +14,8 @@ class Plugin(PyExecPlugin): "ownerEmail" : "m.lettere@gmail.com" } - def __init__(self, data=None): - super().__init__(data) + def __init__(self, data=None, config=None): + super().__init__(data, config) def execute(self): results = [] diff --git a/pyexecplugins/pyexecplugins.py b/pyexecplugins/pyexecplugins.py index 9844b22..738a4df 100644 --- a/pyexecplugins/pyexecplugins.py +++ b/pyexecplugins/pyexecplugins.py @@ -53,8 +53,9 @@ class PyExecPlugins(type): logging.getLogger("pyexec").warning("Unable to register task defs %s", e) class PyExecPlugin(object, metaclass=PyExecPlugins): - def __init__(self, data=None): + def __init__(self, data=None, config=None): self.data = data + self.config = config def hasDefinition(self): return (self.taskdef is not None)