FAQ
Good day to all:

I'm trying to use the browser's dashboard to pass a parameter variable to a
simple class.

class hello ( $file_name ) {
file {"/tmp/${file_name}":
owner => 'ubuntu',
group => 'ubuntu'
}
}

But when I run the agent update I keep getting

ubuntu@db:~$ sudo puppet agent --test
info: Retrieving plugin
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
err: Could not retrieve catalog from remote server: Error 400 on SERVER:
Must pass file_name to Class[Hello] at
/etc/puppetlabs/puppet/modules/hello/manifests/init.pp:1 on node
db.company.com

Any ideas on what I'm doing wrong?

Thanks in advance.

--
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/-/qu732-TrJHMJ.
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

  • Javier Alvarez Samayoa at Oct 26, 2012 at 5:14 pm
    I just found the answer in another thread.

    In case somebody is looking to pass parameters from the dashboard to your
    classes you should
    reference those variables like this:

    $::foo instead of $foo which are local variables

    Hope it helps
    On Friday, October 26, 2012 10:28:11 AM UTC-6, Javier Alvarez Samayoa wrote:

    Good day to all:

    I'm trying to use the browser's dashboard to pass a parameter variable to
    a simple class.

    class hello ( $file_name ) {
    file {"/tmp/${file_name}":
    owner => 'ubuntu',
    group => 'ubuntu'
    }
    }

    But when I run the agent update I keep getting

    ubuntu@db:~$ sudo puppet agent --test
    info: Retrieving plugin
    info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
    info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
    info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
    err: Could not retrieve catalog from remote server: Error 400 on SERVER:
    Must pass file_name to Class[Hello] at
    /etc/puppetlabs/puppet/modules/hello/manifests/init.pp:1 on node
    db.company.com

    Any ideas on what I'm doing wrong?

    Thanks in advance.
    --
    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/-/RoTsakEh9FkJ.
    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
postedOct 26, '12 at 5:14p
activeOct 26, '12 at 8:53p
posts2
users1
websitepuppetlabs.com

1 user in discussion

Javier Alvarez Samayoa: 2 posts

People

Translate

site design / logo © 2021 Grokbase