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 6249243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:12:01+00:00 2026-05-24T13:12:01+00:00

I have following manifest: define foo($var) { file { $var: } $barclass::store += $var

  • 0

I have following manifest:

define foo($var) {
    file { $var: }
    $barclass::store += $var
}

class barclass {
    $store = []
    foo {
        "test1": var => "test1",
        "test2": var => "test2",
    }

    file { "myfile": content => template("puppet:///files/myfile.erb"); }
}

And following erb template:

<% store.each { |i| -%> 
<%= i + " " -%> 
<% } -%> 

My intention here is to collect all $var variables used as parameter of type foo. And provide them in myfile.erb template. In my example $store variable was used.

This example does not work. What have I wrong?

Is there better way to achieve same thing? I basically need to collect parameters used in some type and then provide them in some template.

  • 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-05-24T13:12:02+00:00Added an answer on May 24, 2026 at 1:12 pm

    You can’t access variables set in puppet manifests directly (only facter facts) – what you need is scope.lookupvar

    scope.lookupvar('yourmodulename::barclass::store')
    

    or just

    scope.lookupvar('barclass::store')
    

    if it’s not a module

    SO

    <% scope.lookupvar('barclass::store').each { |i| -%> 
    <%= i + " " -%> 
    <% } -%> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a text file with following lines Manifest-Version: 1.0 MIDlet-Vendor: Croco Gamez MIDlet-Version:
I have this jar: /mybundle.jar/ de/mybundle/myclass.class lib/mysql.jar META-INF/MANIFEST.MF With the following MANIFEST.MF Manifest-Version: 1.0
I have made following changes to the POM.xml file for adding a manifest file
I have the following inside my manifest file: <service android:name=.Rotate android:enabled=true android:label=@string/app_name> <intent-filter> <action
I have used the following in android manifest. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android xmlns:ads=http://schemas.android.com/apk/lib/com.google.ads
In my app I have the main activity defined in the manifest.xml file like
I have a web app (extension) with the following manifest: { name: Porpington, version:
I have an assembly with the following manifest embedded: <assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0> <dependency> <dependentAssembly>
I have a ContentProvider in my manifest, when I define them fully with hardcoded
I have following question. I'd like to place a file named data.xml into sdcard/appname

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.