JGonza1
2012-Sep-11 20:04 UTC
[Puppet Users] How can you copy directories from puppet master to the puppet client?
Is there a way to copy directories and the subdirectories under the parent directory with puppet master to puppet client? How would I do that? -- 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/-/0hO1V5O4MEIJ. 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.
Daniel Pittman
2012-Sep-11 20:31 UTC
Re: [Puppet Users] How can you copy directories from puppet master to the puppet client?
On Tue, Sep 11, 2012 at 1:04 PM, JGonza1 <jgonza1495@gmail.com> wrote:> Is there a way to copy directories and the subdirectories under the parent > directory with puppet master to puppet client? How would I do that?Yes: use the file server, and the `file` type with `recurse`. http://docs.puppetlabs.com/guides/file_serving.html http://docs.puppetlabs.com/references/latest/type.html#file -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- 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.
JGonza1
2012-Sep-11 21:18 UTC
[Puppet Users] Re: How can you copy directories from puppet master to the puppet client?
So if I have in my module in files the directory and all the files and directories under neath it. If the direcctory is not there I should be able to copy all of it with the syntex below. file { "/srv/www": ensure => "directory", recurse => inf, true, owner => "root", group => "root", mode => 755, } On Tuesday, September 11, 2012 1:04:30 PM UTC-7, JGonza1 wrote:> Is there a way to copy directories and the subdirectories under the parent > directory with puppet master to puppet client? How would I do that?-- 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/-/XslaqH_i5Z0J. 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.
Daniel Pittman
2012-Sep-11 21:25 UTC
Re: [Puppet Users] Re: How can you copy directories from puppet master to the puppet client?
On Tue, Sep 11, 2012 at 2:18 PM, JGonza1 <jgonza1495@gmail.com> wrote:> So if I have in my module in files the directory and all the files and > directories under neath it. If the direcctory is not there I should be able > to copy all of it with the syntex below. > file { "/srv/www": > ensure => "directory", > recurse => inf, true,Either ''inf'', or ''true'', not both, but yes - that should do what you want.> owner => "root", > group => "root", > mode => 755,These permissions will apply to *everything* in the tree. If you omit those statements it will copy the values from the files on the master. -- Daniel Pittman ⎋ Puppet Labs Developer – http://puppetlabs.com ♲ Made with 100 percent post-consumer electrons -- 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.
JGonza1
2012-Sep-11 22:06 UTC
[Puppet Users] Re: How can you copy directories from puppet master to the puppet client?
Daniel that did not work see below on the master under /etc/puppet/modules/websharedlibs/files I have the directory /ehrweb which has the directory and files below but on the client it just creates the parent directory and nothing else, client is ct-eng-web02-devint server. My code is [root@ct-eng-pup manifests]# more init.pp class websharedlibs { file { "/opt/caretools/webapps/ehrweb": ensure => "directory", recurse => "true", owner => "root", group => "root", mode => 755, } } [root@ct-eng-pup manifests]# [root@ct-eng-web02-devint webapps]# pwd /opt/caretools/webapps [root@ct-eng-web02-devint webapps]# ll ehrweb total 0 [root@ct-eng-web02-devint webapps]# [root@ct-eng-pup files]# pwd /etc/puppet/modules/websharedlibs/files [root@ct-eng-pup files]# ll total 4 drwxr-xr-x. 13 root root 4096 Sep 11 14:26 ehrwe drwxr-xr-x. 13 root root 4096 Sep 11 14:26 ehrweb [root@ct-eng-pup files]# ll ehrweb total 800 -rw-r--r--. 1 root root 947 Sep 11 14:26 404.html -rw-r--r--. 1 root root 938 Sep 11 14:26 422.html -rw-r--r--. 1 root root 948 Sep 11 14:26 500.html drwxr-xr-x. 2 root root 4096 Sep 11 14:26 assets -rw-r--r--. 1 root root 103 Sep 11 14:26 blank_iframe.html -rw-r--r--. 1 root root 341157 Sep 11 14:26 ccd-schema.xsd -rw-r--r--. 1 root root 18899 Sep 11 14:26 CCD.xsl -rw-r--r--. 1 root root 65482 Sep 11 14:26 ccr-schema.xsd -rw-r--r--. 1 root root 146074 Sep 11 14:26 CCR.xsl drwxr-xr-x. 4 root root 4096 Sep 11 14:26 cdar2c32 drwxr-xr-x. 2 root root 4096 Sep 11 14:26 dev Please help what am I missing? On Tuesday, September 11, 2012 1:04:30 PM UTC-7, JGonza1 wrote:> Is there a way to copy directories and the subdirectories under the parent > directory with puppet master to puppet client? How would I do that?-- 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/-/tIlv5XW336cJ. 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.
JGonza1
2012-Sep-11 22:38 UTC
[Puppet Users] Re: How can you copy directories from puppet master to the puppet client?
I made a change to include the source so the file looks like this below but now when I run puppet agent --server ct-eng-pup --test it hangs a bit but it actually works. Thanks a lot Daniel for pointing me in the right direction. class websharedlibs { file { "/opt/caretools/webapps/ehrweb": ensure => "directory", source => "puppet:///websharedlibs/ehrweb", recurse => "remote", owner => "root", group => "root", mode => 755, } } On Tuesday, September 11, 2012 1:04:30 PM UTC-7, JGonza1 wrote:> Is there a way to copy directories and the subdirectories under the parent > directory with puppet master to puppet client? How would I do that?-- 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/-/PCnMdqDKsmkJ. 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.
JGonza1
2012-Sep-11 22:49 UTC
[Puppet Users] Re: How can you copy directories from puppet master to the puppet client?
The only problem is it just keeps on looping around and never stops coping. On Tuesday, September 11, 2012 1:04:30 PM UTC-7, JGonza1 wrote:> Is there a way to copy directories and the subdirectories under the parent > directory with puppet master to puppet client? How would I do that?-- 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/-/Z6Ox-LXMMCMJ. 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.