Last active
September 9, 2017 16:23
-
-
Save mxey/685bd6a63ade914f3fb41493117c35d8 to your computer and use it in GitHub Desktop.
Testing the effect of Puppet stringify_facts with octocatalog-diff
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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