Elad Shmitanka
2013-Feb-18 06:45 UTC
[Puppet Users] Puppet diff and preview of changes to node''s catalog
While trying to build "safety mechanisms" for applying new configuration, the aim: be able to fore-tell what will be the changes on the nodes, just like you can see the changes in SVN, I want to see how they will affect the nodes. I will manage this by having 2 modules directories, 1 currently used by the puppet master and the second is the "new" one that will be applied, Same for configuration directory. Since I''m a fan of Bash, the idea would be to use command line tools. Create list of the nodes: puppet cert --list --all Will give me list of all the nodes I want to examine Create a compiled catalog: puppet master --compile <node name> --modulepath <module dir> --confdir <config directory> > <node_name> I will run it twice, one for each pair of directories, for each node then using this diff tool: https://github.com/ripienaar/puppet-catalog-diff to show the diff between them Any thoughts? comments? things I may have overlooked? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Peter Brown
2013-Feb-19 00:00 UTC
Re: [Puppet Users] Puppet diff and preview of changes to node''s catalog
Hi Elad, There is an audit mode which may help you. There is an explanation of how it works here. https://puppetlabs.com/blog/all-about-auditing-with-puppet/ On 18 February 2013 16:45, Elad Shmitanka <elad.shmitanka@gmail.com> wrote:> While trying to build "safety mechanisms" for applying new configuration, > the aim: be able to fore-tell what will be the changes on the nodes, just > like you can see the changes in SVN, I want to see how they will affect the > nodes. > I will manage this by having 2 modules directories, 1 currently used by > the puppet master and the second is the "new" one that will be applied, > Same for configuration directory. > > Since I''m a fan of Bash, the idea would be to use command line tools. > Create list of the nodes: > puppet cert --list --all Will give me list of all the nodes I want > to examine > > Create a compiled catalog: > puppet master --compile <node name> --modulepath <module dir> --confdir > <config directory> > <node_name> I will run it twice, one for each pair > of directories, for each node > > then using this diff tool: > https://github.com/ripienaar/**puppet-catalog-diff<https://github.com/ripienaar/puppet-catalog-diff> > to show the diff between them > > > Any thoughts? comments? things I may have overlooked? > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.