<% commands = set() for maybe_fault in check_commands.values(): commands.add(str(maybe_fault)) %>\ % for command in sorted(commands): % if command.startswith('sudo '): sshmon ALL=NOPASSWD: ${command[len('sudo '):]} % endif % endfor