Commit 89784c45 authored by Maverick Chardet's avatar Maverick Chardet
Browse files

Added ability to run an Ansible playbook from G5kReservation

parent 471dd4a4
......@@ -76,6 +76,26 @@ class G5kReservation:
from enoslib.api import play_on
return play_on(roles=self._roles, pattern_hosts=pattern_hosts)
def run_ansible(
self,
playbooks,
inventory_path=None,
extra_vars=None,
tags=None,
on_error_continue=False,
basedir="."
):
from enoslib.api import run_ansible as enoslib_run_ansible
enoslib_run_ansible(
playbooks,
inventory_path=inventory_path,
roles=self._roles,
extra_vars=extra_vars,
tags=tags,
on_error_continue=on_error_continue,
basedir=basedir
)
def __enter__(self):
return self
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment