Skip to content

Instantly share code, notes, and snippets.

@np5
np5 / build_tf_script_checks.py
Last active October 26, 2023 12:07
Tool to load a mSCP guidance file and output the Terraform Munki script check resources definitions
import argparse
import os
from yaml import load, SafeLoader
TEMPLATE = """resource zentral_munki_script_check "mcs-{section}-{rule}" {{
name = "{name}"
description = trimspace(<<EODESC
{description}
EODESC
@np5
np5 / apple_model_identifiers.py
Last active March 22, 2023 19:36
How to get the Apple computer identifiers
import argparse
import urllib.request
PAGES = (
("https://support.apple.com/en-us/HT201862", "MacBook Air", "LAPTOP"),
("https://support.apple.com/en-us/HT201300", "MacBook Pro", "LAPTOP"),
("https://support.apple.com/en-us/HT201894", "Mac mini", "DESKTOP"),
("https://support.apple.com/en-us/HT213073", "Mac Studio", "DESKTOP"),
("https://support.apple.com/en-us/HT201634", "iMac", "DESKTOP"),