In dashboard parameters are assigned via group.

So basically you just create a group, assign some parameters there, include 
some nodes and your class in it.

Parameters created via dashboard group are at the global top scope I believe.

--KL

From: Rakesh K <rkath...@gmail.com<mailto:rkath...@gmail.com>>
Reply-To: "puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>" 
<puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>>
Date: Mon, 6 Aug 2012 05:50:37 -0700
To: "puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>" 
<puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>>
Subject: [Puppet Users] Re: Passing parameters for a class in Dashboard




Or in other words , how do I make sure that following config is applied to my 
node through dashboard

class base1 {

  package { ["rsync", "xinetd"]: ensure => present }
  service { "xinetd": ensure => running }

  include rsyncd
  $password = generate("/usr/bin/pwgen", 8, 1)

  user { "dba":
  ensure => present,
  comment => "DB user",
  gid => "dba",
  shell => "/bin/false",
  require => Group["dba"],
  }

  group { "dba":
  ensure => present,
  }

  file { "/backup-mysql":
    ensure => directory,
    mode => 0775,
    owner => "dba",
    group => "dba",
  }

  file { "/home/dba/rsyncd.secret":
    content => "backup:${password}",
    replace => no,
    mode => 0460,
    owner=> "root",
    group => "dba",
    require => User['dba'],
  }

  rsyncd::export { "backup":
    path => "/backup-mysql",
    chroot => true,
    readonly => true,
    uid => "dba",
    gid => "dba",
    users => "backup",
    secrets => "/home/dba/rsyncd.secret",
    allow => "192.168.0.0/24",
    require => [File["/backup-mysql"], File["/home/dba/rsyncd.secret"]],
  }

}

node 'pclient1.example.com' {
include base1
}





On Monday, August 6, 2012 2:44:00 PM UTC+5:30, Rakesh K wrote:
Hi,

I have recently installed puppet and components including dashboard on my 
server. I am new to puppet and what I am trying to achieve here is passing 
parameters via dashboard

What I can see right now is under Add Class in dashboard, I can only pass the 
class names. Whereas when I can include classes via nodes.pp I can also pass 
parameters.

How can do this from dashboard,

eg. if I want to achieve the following from dashboard how will I be able to do 
it

/etc/puppet/manifests/nodes.pp
class baseclass {
class { 'mysql': }
class { 'mysql::server':
#config_hash => { 'root_password' => 'mypass' }
}
mysql::db { 'mydb':
user     => 'myuser',
password => 'mypass',
host     => 'localhost',
grant    => ['all'],
}
}

node 'pclient1.example.com<http://pclient1.example.com/>' {
        include baseclass
}


And this is how my site.pp looks like

[root@pmast1 ~]# cat /etc/puppet/manifests/site.pp
import 'nodes.pp'
$puppetserver = 'pmast1.example.com<http://pmast1.example.com>'
filebucket { "main":
server => "puppet",
path => false,
}
File { backup => "main" }

Please suggest.

--
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/-/hqByM-qJEegJ.
To post to this group, send email to 
puppet-users@googlegroups.com<mailto:puppet-users@googlegroups.com>.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com<mailto:puppet-users+unsubscr...@googlegroups.com>.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.
This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to