Hi Alex,
Agents write their last catalog to disk in
/var/lib/puppet/client_yaml/catalog/${hostname}.yaml. If you''ve got an
Agent that hasn''t done a Puppet run since you deleted that module, this
file will contain the information you''re after. It''s not the
most
prettily formatted thing though, so I''d suggest combine this
information
with...
Have you seen the Puppet Ralsh tool? It''s a utility that will give you
a
Puppet manifest formatted description of a resource. If you find all the
resource names and types that module managed you can then use this to
generate resource definitions. Unfortunately it looks like reports only
show the detail you''re after if that resource was changed in some way
during the Puppet run. If I look for my puppet::install class I can see
it manages the Package resource "puppet":
[root@hostname state]# grep ''Puppet::Install''
/var/lib/puppet/state/last_run_report.yaml
source: "/Stage[main]/Puppet::Install/Package[puppet]/ensure"
And I can use Ralsh to generate a resource definition as best it can (it
gives me a version number rather than ensure=>latest):
[root@stgweb03 state]# ralsh package puppet
package { ''puppet'':
ensure => ''2.7.12-1.el5.centos'',
}
And again for puppet::service:
[root@stgweb03 state]# grep ''Puppet::Service''
/var/lib/puppet/state/last_run_report.yaml
source: "/Stage[main]/Puppet::Service/Service[puppet]"
[root@stgweb03 state]# ralsh service puppet
service { ''puppet'':
ensure => ''stopped'',
enable => ''false'',
You''ll never be able to regenerate any logic you used to arrive at this
state (if statements, case statements, etc) but at least you have all
the results and can work backwards to a proper module.
Hope that helps,
-Luke
On 24/04/12 02:11, Alex Cline wrote:> Hello,
>
> I accidentally deleted a module from my puppetmaster modules
> directory. Sadly, I didn''t have a recent backup or use version
> control. :( (Live and learn)
>
> Is there a way to recover the module from one of the clients or the
> master?
>
> Thanks.
>
> -- Alex
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
--
Luke Bigum
Information Systems
Ph: +44 (0) 20 3192 2520
luke.bigum@lmax.com | http://www.lmax.com
LMAX, Yellow Building, 1A Nicholas Road, London W11 4AN
FX and CFDs are leveraged products that can result in losses exceeding
your deposit. They are not suitable for everyone so please ensure you
fully understand the risks involved. The information in this email is not
directed at residents of the United States of America or any other
jurisdiction where trading in CFDs and/or FX is restricted or prohibited
by local laws or regulations.
The information in this email and any attachment is confidential and is
intended only for the named recipient(s). The email may not be disclosed
or used by any person other than the addressee, nor may it be copied in
any way. If you are not the intended recipient please notify the sender
immediately and delete any copies of this message. Any unauthorised
copying, disclosure or distribution of the material in this e-mail is
strictly forbidden.
LMAX operates a multilateral trading facility. Authorised and regulated
by the Financial Services Authority (firm registration number 509778) and
is registered in England and Wales (number 06505809).
Our registered address is Yellow Building, 1A Nicholas Road, London, W11
4AN.
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.