FAQ
I have declared in my puppet server my class "lab" , this class create one
archive in the agent but when i sync from agent throws error:

......
info: Applying configuration version '1354468151'
*err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not
retrieve information from source(s) puppet:///modules/lab/files/date.txt at
/etc/puppet/modules/lab/manifests/init.pp:10*
......

My structure in puppet master is:

/etc/puppet/manifests/site.pp
/etc/puppet/modules/lab/manifests/init.pp
/etc/puppet/modules/lab/files/date.txt

My init.pp is:

class lab {

file { "/root/date.txt":
ensure => file,
mode => 640,
owner => root,
group => root,
source => "puppet:///modules/lab/files/date.txt",
}
}


My site.pp

node 'lab1.example.com' {
include lab
}

--
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/-/TVKDTGyB8foJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Craig White at Dec 4, 2012 at 10:06 pm

    On Dec 4, 2012, at 2:16 PM, Kazor wrote:

    I have declared in my puppet server my class "lab" , this class create one archive in the agent but when i sync from agent throws error:

    ......
    info: Applying configuration version '1354468151'
    err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/lab/files/date.txt at /etc/puppet/modules/lab/manifests/init.pp:10
    ......

    My structure in puppet master is:

    /etc/puppet/manifests/site.pp
    /etc/puppet/modules/lab/manifests/init.pp
    /etc/puppet/modules/lab/files/date.txt

    My init.pp is:

    class lab {

    file { "/root/date.txt":
    ensure => file,
    mode => 640,
    owner => root,
    group => root,
    source => "puppet:///modules/lab/files/date.txt",
    }
    }


    My site.pp

    node 'lab1.example.com' {
    include lab
    }
    ----
    looks good, try replacing
    source => "puppet:///modules/lab/files/date.txt",
    with
    source => "puppet:///modules/lab/date.txt",

    Craig

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Diogo Martinez at Dec 5, 2012 at 2:50 pm
    Craig is correct. Directory files doesnt need to be declared. It is
    resolved by puppet structure.
    Em terça-feira, 4 de dezembro de 2012 19h16min39s UTC-2, Kazor escreveu:

    I have declared in my puppet server my class "lab" , this class create one
    archive in the agent but when i sync from agent throws error:

    ......
    info: Applying configuration version '1354468151'
    *err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could
    not retrieve information from source(s)
    puppet:///modules/lab/files/date.txt at
    /etc/puppet/modules/lab/manifests/init.pp:10*
    ......

    My structure in puppet master is:

    /etc/puppet/manifests/site.pp
    /etc/puppet/modules/lab/manifests/init.pp
    /etc/puppet/modules/lab/files/date.txt

    My init.pp is:

    class lab {

    file { "/root/date.txt":
    ensure => file,
    mode => 640,
    owner => root,
    group => root,
    source => "puppet:///modules/lab/files/date.txt",
    }
    }


    My site.pp

    node 'lab1.example.com' {
    include lab
    }
    --
    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/-/168AOcgTj5MJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Miguel Angel Coa Morales at Dec 5, 2012 at 3:14 pm
    Thanks for the clarification. I edit the "source" in my class with the mention of Craig and now is solved.

    Best regards!


    El 05-12-2012, a las 8:07, Diogo Martinez <[email protected]> escribió:
    Craig is correct. Directory files doesnt need to be declared. It is resolved by puppet structure.
    Em terça-feira, 4 de dezembro de 2012 19h16min39s UTC-2, Kazor escreveu:
    I have declared in my puppet server my class "lab" , this class create one archive in the agent but when i sync from agent throws error:

    ......
    info: Applying configuration version '1354468151'
    err: /Stage[main]/Lab/File[/root/date.txt]: Could not evaluate: Could not retrieve information from source(s) puppet:///modules/lab/files/date.txt at /etc/puppet/modules/lab/manifests/init.pp:10
    ......

    My structure in puppet master is:

    /etc/puppet/manifests/site.pp
    /etc/puppet/modules/lab/manifests/init.pp
    /etc/puppet/modules/lab/files/date.txt

    My init.pp is:

    class lab {

    file { "/root/date.txt":
    ensure => file,
    mode => 640,
    owner => root,
    group => root,
    source => "puppet:///modules/lab/files/date.txt",
    }
    }


    My site.pp

    node 'lab1.example.com' {
    include lab
    }


    --
    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/-/168AOcgTj5MJ.
    To post to this group, send email to [email protected].
    To unsubscribe from this group, send email to [email protected].
    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 [email protected].
    To unsubscribe from this group, send email to [email protected].
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedDec 4, '12 at 9:16p
activeDec 5, '12 at 3:14p
posts4
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2023 Grokbase