If that is all you want, run it with --write-catalog-summary and examine the resourcefile (puppet apply --configprint resourcefile)
On 16 December 2013 14:14, David Portabella <[email protected]>wrote: > Hi, thanks again for the info. > > This seems an overcomplicated issue. Just to step back and look at the > global picture: > we are just asking to get the list of all resources updated when executing > "puppet apply" in a non master/agent puppet environment. > this should be a basic functionality; we are not asking something weird. > > after Christmas I'll take a look at installing PuppetDB in the same > virtual machine, connecting puppet apply to it, and try to get the list of > resources updated by puppet apply. > > > Regards, > David > > On Sunday, December 15, 2013 8:59:37 PM UTC+1, Charlie Sharpsteen wrote: >> >> On Friday, December 13, 2013 2:43:41 PM UTC-8, David Portabella wrote: >> >> >>> is there a way to get the list of resources created when using a puppet >>> apply (instead of puppet agent)? >>> >>> the point is that we need this when refactoring puppet modules, in order >>> to test the modules in a vagrant machine and check that there are not >>> regression issues. >>> so, i run our current puppet modules in a vagrant machine, get the list >>> of all puppet resources created, >>> then i refactor the puppet modules, i run again the refactored puppet >>> modules in a new vagrant machine, >>> and i compare all the files and other resources. >>> >> If you are looking to keep track of resources while refactoring, then >> there are a few approaches you can take: >> >> 1. Add another VM to your Vagrant environment that runs a Puppet >> Master and do the refactoring there. This gives you access to tools such >> as >> PuppetDB and the Dashboard while also simulating how your refactor will >> affect an agent/master setup. >> 2. Set up your VM such that puppet apply submits the catalog and >> reports to PuppetDB: https://docs.puppetlabs.com/ >> >> puppetdb/1.5/connect_puppet_apply.html<https://docs.puppetlabs.com/puppetdb/1.5/connect_puppet_apply.html> >> 3. Configure configure YAML caching for puppet apply in >> /etc/puppet/routes.yaml: >> >> >> --- >> apply: >> catalog: >> cache: yaml >> >> This will cause puppet apply to save a copy of the last compiled catalog >> to /var/lib/puppet/state/client_yaml/catalog/<certname>.yaml. The >> information in this file can be combined with the report in >> /var/lib/puppet/state/last_run_report.yaml to create a list of applied >> resources along with their properties and resulting changes. >> >> The first two approaches will cut down on the amount of custom code you >> need to write as the task of parsing and storing the reports and catalogs >> is handled by PuppetDB or the dashboard. Approach 3 works as well and >> offers a lot of control, but you will need to write a bit of code that >> extracts data from the catalog and report files before you can focus on the >> analysis. >> -- >> Charlie Sharpsteen >> Open Source Support Engineer >> Puppet Labs >> > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/6d2793ce-0b9f-468b-bc35-76b149f31f46%40googlegroups.com > . > > For more options, visit https://groups.google.com/groups/opt_out. > -- Erik Dalén -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CAAAzDLdZKfuqaOSWzgZYuJFHCaJ6oYgnSbUQ3RcMe0hkivcvhw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
