FAQ
I'm still a puppet newbie and these days I'm struggling with undefined
variables. At least once a week I hit an error message like this:
        Error: Failed to apply catalog: '' is not qualified and no path was
specified. Please qualify the command or specify a path.

IMO, the core issue is that Puppet has no mechanism for reporting read
attempts on undefined variables. So my question to the community is, what
do YOU do to catch undefined variables? If anyone has a first class
solution I'd love to hear it. But I'm also happy to consider ANY means to
detect undefined variables. I may resort to explicitly listing all my
variables and checking them with a custom ruby function.

--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • David Schmitt at May 3, 2013 at 9:12 am

    On 02.05.2013 22:43, Larry Fast wrote:
    I'm still a puppet newbie and these days I'm struggling with undefined
    variables. At least once a week I hit an error message like this:
    Error: Failed to apply catalog: '' is not qualified and no path
    was specified. Please qualify the command or specify a path.

    IMO, the core issue is that Puppet has no mechanism for reporting read
    attempts on undefined variables. So my question to the community is,
    what do YOU do to catch undefined variables? If anyone has a first
    class solution I'd love to hear it. But I'm also happy to consider ANY
    means to detect undefined variables. I may resort to explicitly listing
    all my variables and checking them with a custom ruby function.
    Hmm, I'm using geppetto (the puppet eclipse integration from cloudsmith)
    which catches typos as they happen.

    I'm very satisfied with it and undefined variables ain't one of my
    problems ;-)


    Regards, David


    --
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Larry Fast at May 3, 2013 at 3:16 pm

    On Friday, May 3, 2013 2:12:41 AM UTC-7, David Schmitt wrote:
    On 02.05.2013 22:43, Larry Fast wrote:
    I'm still a puppet newbie and these days I'm struggling with undefined
    variables. At least once a week I hit an error message like this:
    Error: Failed to apply catalog: '' is not qualified and no path
    was specified. Please qualify the command or specify a path.

    IMO, the core issue is that Puppet has no mechanism for reporting read
    attempts on undefined variables. So my question to the community is,
    what do YOU do to catch undefined variables? If anyone has a first
    class solution I'd love to hear it. But I'm also happy to consider ANY
    means to detect undefined variables. I may resort to explicitly listing
    all my variables and checking them with a custom ruby function.
    Hmm, I'm using geppetto (the puppet eclipse integration from cloudsmith)
    which catches typos as they happen.

    I'm very satisfied with it and undefined variables ain't one of my
    problems ;-)


    Regards, David

    --
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Larry Fast at May 3, 2013 at 3:18 pm
    ...finger slipped...
    Thanks David,
    I started using geppetto as well. Yes, my error count has dropped
    significantly. The other thing I discovered is that hiera("name") produces
    a very clear error if the name doesn't exist. So I moving toward that as
    well.
    Cheers larry

    --
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Peter Brown at May 6, 2013 at 10:41 pm

    On 3 May 2013 06:43, Larry Fast wrote:

    I'm still a puppet newbie and these days I'm struggling with undefined
    variables. At least once a week I hit an error message like this:
    Error: Failed to apply catalog: '' is not qualified and no path was
    specified. Please qualify the command or specify a path.

    IMO, the core issue is that Puppet has no mechanism for reporting read
    attempts on undefined variables. So my question to the community is, what
    do YOU do to catch undefined variables? If anyone has a first class
    solution I'd love to hear it. But I'm also happy to consider ANY means to
    detect undefined variables. I may resort to explicitly listing all my
    variables and checking them with a custom ruby function.
    I use vim with vim-puppet (and a bunch of other vim plugins).
    It does syntax highlighting and does syntax and a few other check on saving
    a file and lets you know if something is amiss.

    I tried Gepetto but I can't us that over an ssh connection to a server if I
    need to.

    --
    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?hl=en.
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nikola Petrov at May 10, 2013 at 3:08 pm
    +1

    The vim plugin is the best you can find if you are already proficient
    in vim somewhat. I use it in conjuction with
    https://github.com/SirVer/ultisnips and it can't be better. I found the
    eclipse too heavy for my needs(although I use it for java development
    where it shines)

    --
    Nikola
    On Tue, May 07, 2013 at 08:41:42AM +1000, Peter Brown wrote:
    On 3 May 2013 06:43, Larry Fast wrote:

    I'm still a puppet newbie and these days I'm struggling with undefined
    variables. At least once a week I hit an error message like this:
    Error: Failed to apply catalog: '' is not qualified and no path was
    specified. Please qualify the command or specify a path.

    IMO, the core issue is that Puppet has no mechanism for reporting read
    attempts on undefined variables. So my question to the community is, what
    do YOU do to catch undefined variables? If anyone has a first class
    solution I'd love to hear it. But I'm also happy to consider ANY means to
    detect undefined variables. I may resort to explicitly listing all my
    variables and checking them with a custom ruby function.
    I use vim with vim-puppet (and a bunch of other vim plugins).
    It does syntax highlighting and does syntax and a few other check on saving
    a file and lets you know if something is amiss.

    I tried Gepetto but I can't us that over an ssh connection to a server if I
    need to.

    --
    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?hl=en.
    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?hl=en.
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • David Schmitt at May 10, 2013 at 8:44 pm

    On 10.05.2013 17:08, Nikola Petrov wrote:
    +1

    The vim plugin is the best you can find if you are already proficient
    in vim somewhat. I use it in conjuction with
    https://github.com/SirVer/ultisnips and it can't be better. I found the
    eclipse too heavy for my needs(although I use it for java development
    where it shines)
    Please satisfy my curiosity: how many puppet modules and/or .pp files do
    you currently have?


    Regards, David

    --
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Pete Brown at May 13, 2013 at 6:04 am

    On 11 May 2013 06:43, David Schmitt wrote:
    On 10.05.2013 17:08, Nikola Petrov wrote:

    +1

    The vim plugin is the best you can find if you are already proficient
    in vim somewhat. I use it in conjuction with
    https://github.com/SirVer/**ultisnips<https://github.com/SirVer/ultisnips>and it can't be better. I found the
    eclipse too heavy for my needs(although I use it for java development
    where it shines)
    Please satisfy my curiosity: how many puppet modules and/or .pp files do
    you currently have?
    I currently have at least 40 modules in my setup.
    Closer to 50 if you count the few I am still finishing off or converting.
    A lot of those I wrote by hand with vim.

    I have no idea how many .pp files that involves. Probably 50 X 5-7 so
    probably over 300 .pp files
    More if you count the few nodes definitions that aren't in my ENC.

    I installed geppetto and made a start at trying to work out how to get it
    setup to replace my vim config but I gave up and just went back to using
    vim.
    It also eats a bunch of ram so it didn't seem worth it just to use for
    writing something I can do for very little memory footprint with vim.


    Regards, David


    --
    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<puppet-users%2Bunsubscribe@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?hl=en<http://groups.google.com/group/puppet-users?hl=en>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Nikola Petrov at May 13, 2013 at 2:07 pm
    I/We currently have 32 modules - some of these are of course third party
    so they don't count.

    One of the modules is for our biggest project which consists of
    different components and their configuration based on different
    environment setups. That module currently contains 36 *.pp files.

    If you think vim can't scale I can assure you that it can. Lately I've
    been using https://github.com/santana/puppet-cleaner to clean my pp
    files and while it is still possible with eclipse to do the same it
    feels so unnatural.

    Maybe eclipse can give many more features like variable checking in the
    current scope but I found that you also pay a price for that
    integration. There is no free lunch.

    --
    Nikola
    On Fri, May 10, 2013 at 10:43:43PM +0200, David Schmitt wrote:
    On 10.05.2013 17:08, Nikola Petrov wrote:
    +1

    The vim plugin is the best you can find if you are already proficient
    in vim somewhat. I use it in conjuction with
    https://github.com/SirVer/ultisnips and it can't be better. I found the
    eclipse too heavy for my needs(although I use it for java development
    where it shines)
    Please satisfy my curiosity: how many puppet modules and/or .pp
    files do you currently have?


    Regards, David

    --
    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?hl=en.
    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?hl=en.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Jakov Sosic at Jul 7, 2013 at 10:05 pm

    On 05/10/2013 10:43 PM, David Schmitt wrote:
    On 10.05.2013 17:08, Nikola Petrov wrote:
    +1

    The vim plugin is the best you can find if you are already proficient
    in vim somewhat. I use it in conjuction with
    https://github.com/SirVer/ultisnips and it can't be better. I found the
    eclipse too heavy for my needs(although I use it for java development
    where it shines)
    Please satisfy my curiosity: how many puppet modules and/or .pp files do
    you currently have?
    In my case (I also use vim + vim-puppet), ~ 66 modules, ~200+ pp files.

    --
    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.
  • Wil Cooley at Jul 8, 2013 at 4:50 pm

    On May 2, 2013 1:45 PM, "Larry Fast" wrote:
    IMO, the core issue is that Puppet has no mechanism for reporting read
    attempts on undefined variables. So my question to the community is, what
    do YOU do to catch undefined variables? If anyone has a first class
    solution I'd love to hear it. But I'm also happy to consider ANY means to
    detect undefined variables. I may resort to explicitly listing all my
    variables and checking them with a custom ruby function.
    >

    If you are comfortable with Ruby (or willing & able to learn it),
    rspec-puppet should catch most or all of these.

    Wil

    --
    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
postedMay 2, '13 at 8:44p
activeJul 8, '13 at 4:50p
posts11
users6
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase