Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8691465
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T00:07:38+00:00 2026-06-13T00:07:38+00:00

Can someone explain to me why would this work : node ‘puppetagent'{ $my_role=proxmoxnode include

  • 0

Can someone explain to me why would this work :

node 'puppetagent'{
    $my_role="proxmoxnode"
    include role_proxmoxnode
}

class role_proxmoxnode {
    include sshdconf
}

And this won’t :

node 'puppetagent'{
    include role_proxmoxnode
}

class role_proxmoxnode {
    $my_role="proxmoxnode"
    include sshdconf
}

By “Work” I mean that the sshd_config.erb file set by sshdconf module will find the $my_role=”proxmoxnode” as expected. By “won’t work”, I mean the template complaining with “Could not find value for ‘my_role'”
I use puppet 3.0.

I followed the doc in http://projects.puppetlabs.com/projects/1/wiki/Infrastructure_Design_Guidelines about roles.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T00:07:39+00:00Added an answer on June 13, 2026 at 12:07 am

    In Puppet 3.0. unqualified variables are looked up in 4 places:

    1. Local scope
    2. Inherited from a base class
    3. Node-level
    4. Top scope

    Local scope, by the way, would apply to variables defined in the class, not in classes which simply include it.

    So, in your first example, we go looking:

    1. Is it local? No.
    2. Is it in a base class? No.
    3. Is it in the node? yes. We stop.

    In the second example…

    1. Is it local? No.
    2. Is it in a base class? No.
    3. Is it in the node? No.
    4. Is it in top scope? No. Fail.

    Clear?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can someone explain why this code doesn't work as expected? I would expect it
Can someone explain to me what this would do? Module Foo class Bar class_inheritable_accessor
Can someone explain why this doesn't work like I think it should. double[] numbers1
Can someone please explain me why would a UDP Server not need to use
I would like to access a MySQL database using PHP. Can someone please explain
Can someone explain this simple, yet deceiving, anomaly? There are two models, where B
Can someone explain me why this works: select val1, val2, count(case when table2.someID in
Can someone explain why, in this situation, scandir is getting my directory, but the
Can someone explain step by step how this query is processed? SELECT F.ID, F.FirstName,
Can someone explain this WPF behaviour? <Page xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <!-- Rounded mask -->

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.