FAQ
Hi -- I'm trying call apply in standalone mode on a configuration I've
written.
The way I call the command is like this:
$ puppet apply manifests/site.pp -v --modulepath modules

The directory structure is simple:
.
manifests/site.pp
manifests/nodes.pp
modules/ ...

site.pp just includes nodes.pp, and nodes.pp looks like this:
https://gist.github.com/3181007

When I comment out the node declaration, it all compiles just fine, but
with the node declaration, I get this error:
Cannot reassign variable name on node
ip-xx-xx-xx-xx.eu-west-1.compute.internal

Obviously, the node's name in the original doesn't have 'xx's, but a valid
IP.

Can anybody advise me as to how to get this working? I've tried everything
I can think of.
Thanks very much for any & all assistance,
Doug.

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

  • Jcbollinger at Jul 26, 2012 at 1:17 pm

    On Thursday, July 26, 2012 3:41:05 AM UTC-5, biot023 wrote:
    Hi -- I'm trying call apply in standalone mode on a configuration I've
    written.
    The way I call the command is like this:
    $ puppet apply manifests/site.pp -v --modulepath modules

    The directory structure is simple:
    .
    manifests/site.pp
    manifests/nodes.pp
    modules/ ...

    site.pp just includes nodes.pp, and nodes.pp looks like this:
    https://gist.github.com/3181007

    When I comment out the node declaration, it all compiles just fine, but
    with the node declaration, I get this error:
    Cannot reassign variable name on node
    ip-xx-xx-xx-xx.eu-west-1.compute.internal

    Obviously, the node's name in the original doesn't have 'xx's, but a valid
    IP.

    Can anybody advise me as to how to get this working? I've tried everything
    I can think of.
    The problem is in one of the classes declared by class 'imageserver', not
    in nodes.pp itself. When you comment out the node declaration, no resource
    declarations remain for any node, so of course there is no error.

    You didn't say anything about the classes declared by class 'imageserver',
    so I can't be more specific than that. If I were to take a wild guess,
    however, it would be that somewhere in there you have a defined type that
    attempts to assign a value to a local variable $name. The variable names
    "name" and "title" are reserved inside defined types; for each instance,
    they are pre-assigned to the resource title, and like all puppet variables,
    their values cannot be reassigned.


    John

    --
    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/-/Vu0Ytpap1-8J.
    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 Jul 26, 2012 at 1:23 pm
    On Thursday, July 26, 2012 8:17:10 AM UTC-5, jcbollinger wrote:

    Hmm. I just realized that you are using Puppet in "apply" mode rather than
    "agent" mode. The problem may simply be that puppet apply doesn't want to
    handle node declarations. I don't use Puppet in "apply" mode, so I'm not
    sure, but node declarations don't make much sense in that context.


    John

    --
    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/-/TXUPq24EBpkJ.
    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.
  • Doug livesey at Jul 26, 2012 at 1:44 pm
    Actually, your first answer was bang on the money -- thankyou ever so much
    for that!
    I'm now hacking through all the rest of the errors and typos to get it all
    running -- it's maybe time I looked into the puppet test module!
    Thanks again, that's really appreciated,
    Doug.
    On 26 July 2012 14:23, jcbollinger wrote:



    On Thursday, July 26, 2012 8:17:10 AM UTC-5, jcbollinger wrote:

    Hmm. I just realized that you are using Puppet in "apply" mode rather
    than "agent" mode. The problem may simply be that puppet apply doesn't
    want to handle node declarations. I don't use Puppet in "apply" mode, so
    I'm not sure, but node declarations don't make much sense in that context.



    John

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

    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.
    --
    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.
  • Nick Fagerlund at Jul 26, 2012 at 8:06 pm

    On Thursday, July 26, 2012 6:23:39 AM UTC-7, jcbollinger wrote:
    Hmm. I just realized that you are using Puppet in "apply" mode rather
    than "agent" mode. The problem may simply be that puppet apply doesn't
    want to handle node declarations. I don't use Puppet in "apply" mode, so
    I'm not sure, but node declarations don't make much sense in that context.
    Nah, node declarations work great with apply mode. The use case is a
    little fuzzy, but let's say you're doing a whole standalone site w/ puppet
    apply being run out of cron. Node definitions would mean you still get the
    traditional benefit of only maintaining one codebase for many heterogeneous
    nodes, and then you just rsync the whole /etc/puppet directory around to
    every node. Every node would get a bunch of extraneous code it never uses,
    but assuming there's no sensitive info in it, you probably don't mind.

    (Apply mode can use an ENC too, come to think of it.)

    --
    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/-/TomA2jZ6UVsJ.
    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
postedJul 26, '12 at 8:41a
activeJul 26, '12 at 8:06p
posts5
users3
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase