def salt_master(project, target, module, args=None, kwargs=None):
client = project.cluster.head.ssh_client<EOL>cmd = ['<STR_LIT>']<EOL>cmd.extend(generate_salt_cmd(target, module, args, kwargs))<EOL>cmd.append('<STR_LIT>')<EOL>cmd.append('<STR_LIT>')<EOL>cmd = '<STR_LIT:U+0020>'.join(cmd)<EOL>output = client.exec_command(cmd, sudo=True)<EOL>if output['<STR_LIT>'] == <NUM_LIT:0>:<EOL><INDENT>return output['<STR_LIT>']<EOL><DEDENT>else:<EOL><INDENT>return output['<STR_LIT>']<EOL><DEDENT>
Execute a `salt` command in the head node