Skip to content

Instantly share code, notes, and snippets.

@graste
Last active December 15, 2015 04:50
Show Gist options
  • Save graste/5204294 to your computer and use it in GitHub Desktop.
Save graste/5204294 to your computer and use it in GitHub Desktop.
Export puppet run on guest system via .dot as .svg to host system

Use --graph as option for puppet in Vagrantfile:

Vagrant::Config.run do |config|
  config.vm.define :devbox do |devbox|
    ...
    devbox.vm.customize ["modifyvm", :id, "--name", "trololo-devbox"]
    ...
    devbox.vm.provision :shell, :inline => "apt-get update --fix-missing"
    ...
    devbox.vm.provision :puppet do |puppet|
      ...
      puppet.options = "--verbose --debug --graph"
    end
  end
end

Host-CLI:

$ vagrant ssh-config > ssh-config
$ ssh -F ssh-config devbox dot -Tsvg -o /tmp/resources.svg /var/lib/puppet/state/graphs/resources.dot
$ scp -F ssh-config devbox:/tmp/resources.svg .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment