def salt_ssh(project, target, module, args=None, kwargs=None):
cmd = ['<STR_LIT>']<EOL>cmd.extend(generate_salt_cmd(target, module, args, kwargs))<EOL>cmd.append('<STR_LIT>')<EOL>cmd.append('<STR_LIT>' % project.roster_path)<EOL>cmd.append('<STR_LIT>' % project.salt_ssh_config_dir)<EOL>cmd.append('<STR_LIT>')<EOL>cmd.append('<STR_LIT>')<EOL>cmd = '<STR_LIT:U+0020>'.join(cmd)<EOL>logger.debug('<STR_LIT>', cmd)<EOL>proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)<EOL>out, err = proc.communicate()<EOL>if proc.returncode != <NUM_LIT:0> or err:<EOL><INDENT>raise Exception(err)<EOL><DEDENT>return out + err<EOL>
Execute a `salt-ssh` command