FAQ
I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from
puppetlabs.

I'm attempting to use file_line to add a line to a file. I've dumbed this
down to basically the test script:

class hs_puptest1 {

    file { '/tmp/testfile':
      ensure => present
    }->
    file_line { 'test_line':
      line => 'Some data',
      path => '/tmp/testfile',
    }
}

The puppet agent puptest1 creates /tmp/testfile, but it does not add the
line to the file. I don't even see file_line executed:

puptest1.library.nd.edu|root no_ora /etc/puppet 673$ puppet agent --test
Info: Caching catalog for puptest1.library.nd.edu
Info: Applying configuration version '1375219378'
Notice: /Stage[main]/Hs_puptest1/File[/tmp/testfile]/ensure: created
Notice: Finished catalog run in 1.86 seconds
puptest1.library.nd.edu|root no_ora /etc/puppet 674$ cat /tmp/testfile
puptest1.library.nd.edu|root no_ora /etc/puppet 675$

What am I doing wrong? What might be missing?

Thanks,
Tom
hanstra@nd.edu

--
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 post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Martin Alfke at Jul 31, 2013 at 9:50 am
    Hi,

    do you have pluginsync enabled?

    During the first puppet agent run (after you have added std lib module) you will see many files synced to the agent.

    hth,

    Martin

    On Jul 30, 2013, at 11:24 PM, Tom Hanstra wrote:

    I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from puppetlabs.

    I'm attempting to use file_line to add a line to a file. I've dumbed this down to basically the test script:

    class hs_puptest1 {

    file { '/tmp/testfile':
    ensure => present
    }->
    file_line { 'test_line':
    line => 'Some data',
    path => '/tmp/testfile',
    }
    }

    The puppet agent puptest1 creates /tmp/testfile, but it does not add the line to the file. I don't even see file_line executed:

    puptest1.library.nd.edu|root no_ora /etc/puppet 673$ puppet agent --test
    Info: Caching catalog for puptest1.library.nd.edu
    Info: Applying configuration version '1375219378'
    Notice: /Stage[main]/Hs_puptest1/File[/tmp/testfile]/ensure: created
    Notice: Finished catalog run in 1.86 seconds
    puptest1.library.nd.edu|root no_ora /etc/puppet 674$ cat /tmp/testfile
    puptest1.library.nd.edu|root no_ora /etc/puppet 675$

    What am I doing wrong? What might be missing?

    Thanks,
    Tom
    hanstra@nd.edu

    --
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • OlliesDad at Jul 31, 2013 at 10:04 am

    On Tuesday, July 30, 2013 10:24:41 PM UTC+1, Tom Hanstra wrote:
    I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from
    puppetlabs.

    I'm attempting to use file_line to add a line to a file. I've dumbed this
    down to basically the test script:

    class hs_puptest1 {

    file { '/tmp/testfile':
    ensure => present
    }->
    file_line { 'test_line':
    line => 'Some data',
    path => '/tmp/testfile',
    }
    }


    Add
    ensure => present

    To the file_line resource as well.

    --
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tom Hanstra at Jul 31, 2013 at 12:46 pm
    No, I don't have pluginsync enabled, but when I attempt to do so I get this
    error:

    Info: Retrieving plugin
    Error: Could not retrieve plugin: Parameter source failed on
    File[/var/lib/puppet/lib]: Could not understand source
    puppet://lib_puppet2.library.nd.edu/plugins: the scheme puppet does not
    accept registry part: lib_puppet2.library.nd.edu (or bad hostname?)

    I've been searching the web, but have not found the combination to get past
    this. Documentation only suggests enabling pluginsync on both master and
    agent, which is not enough. What else am I missing?

    Thanks,
    Tom

    On Tuesday, July 30, 2013 5:24:41 PM UTC-4, Tom Hanstra wrote:

    I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from
    puppetlabs.

    I'm attempting to use file_line to add a line to a file. I've dumbed this
    down to basically the test script:

    class hs_puptest1 {

    file { '/tmp/testfile':
    ensure => present
    }->
    file_line { 'test_line':
    line => 'Some data',
    path => '/tmp/testfile',
    }
    }

    The puppet agent puptest1 creates /tmp/testfile, but it does not add the
    line to the file. I don't even see file_line executed:

    puptest1.library.nd.edu|root no_ora /etc/puppet 673$ puppet agent --test
    Info: Caching catalog for puptest1.library.nd.edu
    Info: Applying configuration version '1375219378'
    Notice: /Stage[main]/Hs_puptest1/File[/tmp/testfile]/ensure: created
    Notice: Finished catalog run in 1.86 seconds
    puptest1.library.nd.edu|root no_ora /etc/puppet 674$ cat /tmp/testfile
    puptest1.library.nd.edu|root no_ora /etc/puppet 675$

    What am I doing wrong? What might be missing?

    Thanks,
    Tom
    hanstra@nd.edu
    --
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Martin Alfke at Jul 31, 2013 at 12:57 pm
    http://projects.puppetlabs.com/issues/3504
    factsync doesn't work when puppetmaster has _ in hostname

    Updated by Patrick Carlisle over 1 year ago

      • Status changed from Needs More Information to Closed
    This is an error raised by ruby’s URI library. Unfortunately the error is not more specific, but the string does correctly suggest bad hostname as a cause. I think we’re unlikely to do anything more about this, and it’s nearly two years old, so I’m closing it.

    Please have a look at RFC952 (http://tools.ietf.org/html/rfc952) Hostnames should not contain an ‘_’!
    On Jul 31, 2013, at 2:46 PM, Tom Hanstra wrote:

    No, I don't have pluginsync enabled, but when I attempt to do so I get this error:

    Info: Retrieving plugin
    Error: Could not retrieve plugin: Parameter source failed on File[/var/lib/puppet/lib]: Could not understand source puppet://lib_puppet2.library.nd.edu/plugins: the scheme puppet does not accept registry part: lib_puppet2.library.nd.edu (or bad hostname?)

    I've been searching the web, but have not found the combination to get past this. Documentation only suggests enabling pluginsync on both master and agent, which is not enough. What else am I missing?

    Thanks,
    Tom


    On Tuesday, July 30, 2013 5:24:41 PM UTC-4, Tom Hanstra wrote:
    I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from puppetlabs.

    I'm attempting to use file_line to add a line to a file. I've dumbed this down to basically the test script:

    class hs_puptest1 {

    file { '/tmp/testfile':
    ensure => present
    }->
    file_line { 'test_line':
    line => 'Some data',
    path => '/tmp/testfile',
    }
    }

    The puppet agent puptest1 creates /tmp/testfile, but it does not add the line to the file. I don't even see file_line executed:

    puptest1.library.nd.edu|root no_ora /etc/puppet 673$ puppet agent --test
    Info: Caching catalog for puptest1.library.nd.edu
    Info: Applying configuration version '1375219378'
    Notice: /Stage[main]/Hs_puptest1/File[/tmp/testfile]/ensure: created
    Notice: Finished catalog run in 1.86 seconds
    puptest1.library.nd.edu|root no_ora /etc/puppet 674$ cat /tmp/testfile
    puptest1.library.nd.edu|root no_ora /etc/puppet 675$

    What am I doing wrong? What might be missing?

    Thanks,
    Tom
    hanstra@nd.edu

    --
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Tom Hanstra at Jul 31, 2013 at 5:54 pm
    Well, the hostname was the problem. That never tripped me up before, but
    I'll keep it in mind for future reference!

    Thanks,
    Tom
    On Tuesday, July 30, 2013 5:24:41 PM UTC-4, Tom Hanstra wrote:

    I'm running puppet 3.2.3 with the current (4.1.0) stdlib set from
    puppetlabs.

    I'm attempting to use file_line to add a line to a file. I've dumbed this
    down to basically the test script:

    class hs_puptest1 {

    file { '/tmp/testfile':
    ensure => present
    }->
    file_line { 'test_line':
    line => 'Some data',
    path => '/tmp/testfile',
    }
    }

    The puppet agent puptest1 creates /tmp/testfile, but it does not add the
    line to the file. I don't even see file_line executed:

    puptest1.library.nd.edu|root no_ora /etc/puppet 673$ puppet agent --test
    Info: Caching catalog for puptest1.library.nd.edu
    Info: Applying configuration version '1375219378'
    Notice: /Stage[main]/Hs_puptest1/File[/tmp/testfile]/ensure: created
    Notice: Finished catalog run in 1.86 seconds
    puptest1.library.nd.edu|root no_ora /etc/puppet 674$ cat /tmp/testfile
    puptest1.library.nd.edu|root no_ora /etc/puppet 675$

    What am I doing wrong? What might be missing?

    Thanks,
    Tom
    hanstra@nd.edu
    --
    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 post to this group, send email to puppet-users@googlegroups.com.
    Visit this group at http://groups.google.com/group/puppet-users.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedJul 30, '13 at 9:24p
activeJul 31, '13 at 5:54p
posts6
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase