FAQ
Hello,

I am running puppet 2.7.11 on my puppet client and puppet master.
I generated and signed my certs but for some reason my configurations
are not
being applied on my client box.

When running the following command it appears to be pulling the
configurations
but does not apply them. Is there a special command that I need to
run
initially to make this happen?

puppetd --server puppet.example.com --waitforcert 60 --test
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not
retrieve information from environment production source(s)
puppet://puppet.example.com/plugins
info: Caching catalog for roxann
info: Applying configuration version '1337314498'
notice: Finished catalog run in 0.08 seconds

Here is the configuration that I am trying to apply:

/etc/puppet/manifests/site.pp
node default {
file { "/srv/test_file.txt":
owner => 'root',
group => 'root',
mode => '0777',
}
}

Thanks in advance!

--
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.

Search Discussions

  • Peter Bukowinski at May 25, 2012 at 12:42 am

    On May 24, 2012, at 8:05 PM, macmichael01 wrote:

    Hello,

    I am running puppet 2.7.11 on my puppet client and puppet master.
    I generated and signed my certs but for some reason my configurations
    are not
    being applied on my client box.

    When running the following command it appears to be pulling the
    configurations
    but does not apply them. Is there a special command that I need to
    run
    initially to make this happen?

    puppetd --server puppet.example.com --waitforcert 60 --test
    info: Retrieving plugin
    err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not
    retrieve information from environment production source(s)
    puppet://puppet.example.com/plugins
    info: Caching catalog for roxann
    info: Applying configuration version '1337314498'
    notice: Finished catalog run in 0.08 seconds

    Here is the configuration that I am trying to apply:

    /etc/puppet/manifests/site.pp
    node default {
    file { "/srv/test_file.txt":
    owner => 'root',
    group => 'root',
    mode => '0777',
    }
    }

    Thanks in advance!
    Try adding an 'ensure => file,' attribute to the beginning of the file resource block. I believe puppet's default behavior is to *not* create a resource unless ensure is used to specify it.

    --
    Peter Bukowinski

    --
    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.
  • Jcbollinger at May 25, 2012 at 12:59 pm

    On May 24, 7:42 pm, Peter Bukowinski wrote:
    On May 24, 2012, at 8:05 PM, macmichael01 wrote:

    Here is the configuration that I am trying to apply:
    /etc/puppet/manifests/site.pp
    node default {
    file { "/srv/test_file.txt":
    owner => 'root',
    group => 'root',
    mode  => '0777',
    }
    }
    Thanks in advance!
    Try adding an 'ensure => file,' attribute to the beginning of the file resource block.

    Yes, do, but that's not the problem.

    I believe puppet's default behavior is to *not* create a resource unless ensure is used to specify it.

    That is mistaken. Generally speaking, the default value for 'ensure'
    parameters is "present" or some equivalent value. There has to be
    some default value because otherwise the resource declaration is
    meaningless. Puppet's default might actually be "file" for this
    resource type, but it makes no actual difference in this case.


    John

    --
    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.
  • Stefan Schulte at May 26, 2012 at 2:36 pm

    On Fri, May 25, 2012 at 05:59:01AM -0700, jcbollinger wrote:

    On May 24, 7:42 pm, Peter Bukowinski wrote:
    On May 24, 2012, at 8:05 PM, macmichael01 wrote:

    Here is the configuration that I am trying to apply:
    /etc/puppet/manifests/site.pp
    node default {
    file { "/srv/test_file.txt":
    owner => 'root',
    group => 'root',
    mode  => '0777',
    }
    }
    Thanks in advance!
    Try adding an 'ensure => file,' attribute to the beginning of the file resource block.

    Yes, do, but that's not the problem.

    I believe puppet's default behavior is to *not* create a resource unless ensure is used to specify it.

    That is mistaken. Generally speaking, the default value for 'ensure'
    parameters is "present" or some equivalent value. There has to be
    some default value because otherwise the resource declaration is
    meaningless. Puppet's default might actually be "file" for this
    resource type, but it makes no actual difference in this case.
    Just for the record:

    That is not true for the filetype. The filetype has no default value for
    ensure. If you do not specify ensure here it means: Manage the specified
    attributes if file/directory is present, otherwise do nothing.

    So if I e.g. just manage owner but not ensure and the resource is not
    present...

    # ls -l /tmp/test
    ls: cannot access /tmp/test: No such file or directory
    # puppet apply -ve 'file { "/tmp/test": owner => nobody }'
    info: Applying configuration version '1338042729'
    notice: Finished catalog run in 0.12 second

    ... puppet will not create the file. But if the file is present...

    # touch /tmp/test
    # puppet apply -ve 'file { "/tmp/test": owner => nobody }
    info: Applying configuration version '1338042740'
    notice: /Stage[main]//File[/tmp/test]/owner:
    owner changed 'root' to 'nobody'
    notice: Finished catalog run in 0.08 seconds

    ...Puppet will manage owner

    -Stefan

    --
    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.
  • Jcbollinger at May 25, 2012 at 1:14 pm

    On May 24, 7:05 pm, macmichael01 wrote:
    I am running puppet 2.7.11 on my puppet client and puppet master.
    I generated and signed my certs but for some reason my configurations
    are not
    being applied on my client box.

    When running the following command it appears to be pulling the
    configurations
    but does not apply them. Is there a special command that I need to
    run
    initially to make this happen?

    No, but look here:

    info: Retrieving plugin
    err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not
    retrieve information from environment production source(s)
    puppet://puppet.example.com/plugins

    That looks like a misconfiguration, probably of the client. Puppet is
    looking for its own plugins under /var/lib/puppet/lib, but that
    directory doesn't exist. Those plugins include everything Puppet
    would use to apply the catalog, so it's not surprising that nothing is
    applied.

    I don't know how Puppet got into this strange state, but you could try
    to solve it by configuring the correct directory via a 'libdir'
    parameter in the [main] section of puppet.conf.


    John

    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 25, '12 at 12:07a
activeMay 26, '12 at 2:36p
posts5
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase