Skip to content

Instantly share code, notes, and snippets.

View terminalmage's full-sized avatar

Erik Johnson terminalmage

View GitHub Profile
@terminalmage
terminalmage / README.md
Last active February 13, 2024 14:44
Salt Debugging Best Practices (SaltConf 18)

Salt Debugging Best Practices

These notes should prove useful for those looking for tips on how to find and fix bugs, as well as those who are developing Salt and would like to improve/streamline the process.

NOTE: These notes are written from the perspective of a developer working in a Linux environment. Those on MacOS may need to make some adjustments. Those on Windows may need to make several adjustments.

@terminalmage
terminalmage / moved.md
Last active June 1, 2023 15:43
POC dockerfile for Salt development
@terminalmage
terminalmage / keybase.md
Created December 12, 2023 21:56
keybase.md

Keybase proof

I hereby claim:

  • I am terminalmage on github.
  • I am terminalmage (https://keybase.io/terminalmage) on keybase.
  • I have a public key whose fingerprint is D90B E111 762B 6037 871A FC07 AE4A 8662 4F61 F536

To claim this, I am signing this object:

@terminalmage
terminalmage / README.md
Created March 20, 2024 17:27
topcheck.py

What we can currently detect

  • Duplicate match expressions
    • If merged, duplicate expressions will break state and pillar top file rendering
    • This has bitten us before, and is hard to detect with the files being so large
  • Invalid/misspelled match types
    • e.g. - match: prce instead of pcre
    • Will break state and pillar top file rendering, even if the match expression under which it is found does not apply to your box
  • This is because each expression must be evaluated to see if it applies to a given minion
#!/bin/sh
# WARNING: Changes to this file in the salt repo will be overwritten!
# Please submit pull requests against the salt-bootstrap repo:
# https://github.com/saltstack/salt-bootstrap
# shellcheck disable=SC2317
# shellcheck disable=SC2086
# shellcheck disable=SC2329
#
#======================================================================================================================