Created
March 5, 2009 21:37
-
-
Save philz/74566 to your computer and use it in GitHub Desktop.
This file contains 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
# Make sense of puppet circular dependency error messages. | |
# Tags: graphviz, puppet | |
# See output at http://i41.tinypic.com/b6yeqv.jpg | |
$ cat circular.pp | |
node default { | |
exec { "/a": require => Exec["/b"] } | |
exec { "/b": require => Exec["/c"] } | |
exec { "/c": require => Exec["/a"] } | |
} | |
$ puppet --color=false circular.pp \ | |
| grep "the following relationships: " \ | |
| awk -F"the following relationships: " '{ print $2 }' \ | |
| tr , \\n \ | |
| (echo "digraph {"; perl -pi -e's/^\s*(\S.*\S) => (\S.*\S)\s*$/ "$1" -> "$2";\n/'; echo "}") \ | |
| dot -Tpdf > circular.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment