initial version

Signed-off-by: lloretgalleg <illoret@indra.es>
diff --git a/osm_ee/util/__init__.py b/osm_ee/util/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/osm_ee/util/__init__.py
diff --git a/osm_ee/util/__pycache__/__init__.cpython-36.pyc b/osm_ee/util/__pycache__/__init__.cpython-36.pyc
new file mode 100644
index 0000000..138334b
--- /dev/null
+++ b/osm_ee/util/__pycache__/__init__.cpython-36.pyc
Binary files differ
diff --git a/osm_ee/util/__pycache__/util_ansible.cpython-36.pyc b/osm_ee/util/__pycache__/util_ansible.cpython-36.pyc
new file mode 100644
index 0000000..d6cbaeb
--- /dev/null
+++ b/osm_ee/util/__pycache__/util_ansible.cpython-36.pyc
Binary files differ
diff --git a/osm_ee/util/__pycache__/util_ee.cpython-36.pyc b/osm_ee/util/__pycache__/util_ee.cpython-36.pyc
new file mode 100644
index 0000000..2c6940c
--- /dev/null
+++ b/osm_ee/util/__pycache__/util_ee.cpython-36.pyc
Binary files differ
diff --git a/osm_ee/util/util_ansible.py b/osm_ee/util/util_ansible.py
new file mode 100644
index 0000000..8f27875
--- /dev/null
+++ b/osm_ee/util/util_ansible.py
@@ -0,0 +1,46 @@
+##
+# Copyright 2019 Telefonica Investigacion y Desarrollo, S.A.U.
+# This file is part of OSM
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# For those usages not covered by the Apache License, Version 2.0 please
+# contact with: nfvlabs@tid.es
+##
+
+import logging
+import json
+from shlex import quote
+
+import osm_ee.util.util_ee as util_ee
+
+logger = logging.getLogger("osm_ee.util_ansible")
+
+
+async def execute_playbook(playbook_name: str, inventory: str, extra_vars: dict,
+                           ) -> (int, str):
+
+    command = 'ansible-playbook --inventory={} --extra-vars {} {}'.format(quote(inventory),
+                                                                          quote(json.dumps(extra_vars)),
+                                                                          quote(playbook_name))
+
+    logger.debug("Command to be executed: {}".format(command))
+
+    return_code, stdout, stderr = await util_ee.local_async_exec(command)
+    logger.debug("Return code: {}".format(return_code))
+    logger.debug("stdout: {}".format(stdout))
+    logger.debug("stderr: {}".format(stderr))
+
+    return return_code, stdout, stderr
diff --git a/osm_ee/util/util_ee.py b/osm_ee/util/util_ee.py
new file mode 100644
index 0000000..1d0a232
--- /dev/null
+++ b/osm_ee/util/util_ee.py
@@ -0,0 +1,60 @@
+##
+# Copyright 2019 Telefonica Investigacion y Desarrollo, S.A.U.
+# This file is part of OSM
+# All Rights Reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# For those usages not covered by the Apache License, Version 2.0 please
+# contact with: nfvlabs@tid.es
+##
+
+import logging
+import asyncio
+from shlex import split
+
+logger = logging.getLogger("osm_ee.util")
+
+
+async def local_async_exec(command: str
+                           ) -> (int, str, str):
+    """
+        Executed a local command using asyncio.
+        TODO - do not know yet if return error code, and stdout and strerr or just one of them
+    """
+    scommand = split(command)
+
+    logger.debug("Execute local command: {}".format(command))
+    process = await asyncio.create_subprocess_exec(
+        *scommand,
+        stdout=asyncio.subprocess.PIPE,
+        stderr=asyncio.subprocess.PIPE
+    )
+
+    # wait for command terminate
+    stdout, stderr = await process.communicate()
+
+    return_code = process.returncode
+    logger.debug("Return code: {}".format(return_code))
+
+    output = ""
+    if stdout:
+        output = stdout.decode()
+        logger.debug("Output: {}".format(output))
+
+    if stderr:
+        out_err = stderr.decode()
+        logger.debug("Stderr: {}".format(out_err))
+
+    return return_code, stdout, stderr