@property<EOL><INDENT>def fabric_task(self):<DEDENT>
from fabric import api<EOL>@api.task<EOL>def run_script(container_name, definition_filename, image_name, image_tag, repository, timeout):<EOL><INDENT>"""<STR_LIT>"""<EOL>workdir = str((Path("<STR_LIT>") / self.cwd).resolve())<EOL>cmd = "<STR_LIT>" if self.inherit_image else "<STR_LIT>"<EOL>api.run(f"<STR_LIT>")<EOL>container_running = int(api.run(f"<STR_LIT>"))<EOL>container_stopped = int(api.run(f"<STR_LIT>"))<EOL>if container_running == <NUM_LIT:0>:<EOL><INDENT>if container_stopped:<EOL><INDENT>api.run(f"<STR_LIT>")<EOL><DEDENT>api.run(f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>"<EOL>f"<STR_LIT>")<EOL>api.run(f"<STR_LIT>")<EOL>api.run(f"<STR_LIT>")<EOL>api.run(f"<STR_LIT>")<EOL>api.run(f"<STR_LIT>")<EOL>api.run(f"<STR_LIT>")<EOL><DEDENT>api.run(f"<STR_LIT>")<EOL>output = api.run(<EOL>"<STR_LIT:U+0020>".join([<EOL>"<STR_LIT>", "<STR_LIT>", container_name,<EOL>"<STR_LIT>", "<STR_LIT>", f"<STR_LIT>",<EOL>]),<EOL>timeout=math.ceil(timeout)<EOL>)<EOL>if not self.keep_container_running:<EOL><INDENT>api.run(f"<STR_LIT>")<EOL><DEDENT>return output<EOL><DEDENT>return run_script<EOL>
Returns a fabric task which executes the script in the Vagrant VM