Sandra, On the run so no time to write up a quick example - but take a look at exported resources. There's a design patterns page --
http://docs.puppetlabs.com/guides/exported_resources.html These are designed to do what you're looking for. -Eric -- Eric Shamow Professional Services http://puppetlabs.com/ (c)631.871.6441 Join us for PuppetConf 2012 at the Mission Bay Convention Center in San Francisco, California on September 27th and 28th --> http://bit.ly/pcsig12 On Thursday, August 30, 2012 at 9:41 AM, Sandra Schlichting wrote: > Hi, > > I would like to write a class that can copy /root/.ssh/id_dsa from node A to > node B. > > > class sshkeycopy { > > exec {"ssh-keygen -q -t dsa -f /root/.ssh/id_dsa -P ''": > > creates => "/root/.ssh/id_dsa.pub" > > } > > file {"/root/.ssh/id_dsa": > > mode => "644", > > owner => root, > > group => root, > > } > > exec {"???": > > subscribe => Exec["ssh-keygen -q -t dsa -f /root/.ssh/id_dsa -P ''"], > > refreshonly => true > > } > > } > > The puppet master can login to node B without passphrase and append a key > > cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' > > So the question is how to copy /root/.ssh/id_dsa.pub from node A to the > puppet master and then push it to node B? > > Hugs, > Sandra > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/puppet-users/-/UZoM9krZK74J. > To post to this group, send email to puppet-users@googlegroups.com > (mailto:puppet-users@googlegroups.com). > To unsubscribe from this group, send email to > puppet-users+unsubscr...@googlegroups.com > (mailto:puppet-users+unsubscr...@googlegroups.com). > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.