Skip to content

Instantly share code, notes, and snippets.

@mxey
Last active September 9, 2017 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mxey/685bd6a63ade914f3fb41493117c35d8 to your computer and use it in GitHub Desktop.
Save mxey/685bd6a63ade914f3fb41493117c35d8 to your computer and use it in GitHub Desktop.
Testing the effect of Puppet stringify_facts with octocatalog-diff
#!/bin/bash
set -e -u -o pipefail
mkdir -p facts
for hostname in "$@"; do
echo "${hostname}"
fact_file="facts/${hostname}.json"
(
ssh "${hostname}" sudo facter --json --puppet > "${fact_file}"
octocatalog-diff --hostname "${hostname}" --to-fact-file "${fact_file}" --from .
) || true
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment