FAQ
Can someone help, im trying to send an entire directory with its contents
to the puppet agent. Here is the init.pp file:


class testing {

file { "C:/test/":


ensure => directory,
owner => 'Administrator',
group => 'Administrators',
mode => '0755',
}



file { "C:/test/testscript":


ensure => directory,
owner => 'Administrator',
group => 'Administrators',
mode => '0755',
source => "puppet:///modules/testing/files",
recurse => true,


}
}


When running the agent on the puppet it gives this error:

error: /stage[main]Testing/File/[testscript]: Could not evalate: Could not
retrieve information from environment production source
puppet:///modules/testing/files at
/etc/puppet/modules/testing/manifests/init.pp:17
I can serve single files but not a directory.
Many thanks :)

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e2105f30-5e7d-43db-b6db-f8ae6b1bf512%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Dan White at Nov 28, 2013 at 4:00 pm
    I hope there are not a lot of files in that directory because I believe you have to manage each one.
    I could be mistaken, but I do not know of a way to do it.
    There may be a way to shortcut the operation, but I believe you need a resource declared for every file and directory you want to manage.
    On Nov 28, 2013, at 6:09 AM, Waqar Khan wrote:

    Can someone help, im trying to send an entire directory with its contents to the puppet agent. Here is the init.pp file:

    class testing {
    file { "C:/test/":

    ensure => directory,
    owner => 'Administrator',
    group => 'Administrators',
    mode => '0755',
    }

    file { "C:/test/testscript":

    ensure => directory,
    owner => 'Administrator',
    group => 'Administrators',
    mode => '0755',
    source => "puppet:///modules/testing/files",
    recurse => true,

    }
    }


    When running the agent on the puppet it gives this error:

    error: /stage[main]Testing/File/[testscript]: Could not evalate: Could not retrieve information from environment production source puppet:///modules/testing/files at /etc/puppet/modules/testing/manifests/init.pp:17
    I can serve single files but not a directory.
    Many thanks :)

    --
    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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/e2105f30-5e7d-43db-b6db-f8ae6b1bf512%40googlegroups.com.
    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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/EE20FF00-0313-40DA-AB8E-4B3EB4D67DAF%40comcast.net.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jcbollinger at Dec 2, 2013 at 5:56 pm

    On Thursday, November 28, 2013 5:09:09 AM UTC-6, Waqar Khan wrote:
    Can someone help, im trying to send an entire directory with its contents
    to the puppet agent. Here is the init.pp file:


    class testing {

    file { "C:/test/":


    ensure => directory,
    owner => 'Administrator',
    group => 'Administrators',
    mode => '0755',
    }



    file { "C:/test/testscript":


    ensure => directory,
    owner => 'Administrator',
    group => 'Administrators',
    mode => '0755',
    source => "puppet:///modules/testing/files",
    recurse => true,


    }
    }


    When running the agent on the puppet it gives this error:

    error: /stage[main]Testing/File/[testscript]: Could not evalate: Could not
    retrieve information from environment production source
    puppet:///modules/testing/files at
    /etc/puppet/modules/testing/manifests/init.pp:17
    I can serve single files but not a directory.
    Your DSL looks ok to me on first glance. I think the error message is
    telling you that <modulepath>/testing/files/files (doubled "/files"
    intentional) does not exist on your master, or is not readable by the
    master. Do you perhaps mean to use

       source => 'puppet:///modules/testing/testscript'

    , which would try to sync a directory <modulepath>/testing/files/testscript
    from your master to your clients? With

       recurse => true

    , as you specify, the directory's contents should be synced as well. The
    name of the source directory on the master does not need to match the name
    of the target directory on the client, but you do need to give it.


    John

    --
    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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/6a1b34bd-a4b1-43f6-992e-bd9851f504bf%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedNov 28, '13 at 1:47p
activeDec 2, '13 at 5:56p
posts3
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase