Actually I installed another puppet agent and it works on this new 
agent...still not on the old agent...very interesting...

I leave init.pp and service.pp untouched, only modify params.pp

from
$service_ensure    = 'running'

to
$service_ensure    = "${::service_ensure}"

Will continue debugging why it works on one agent but not on the other...

On Tuesday, August 5, 2014 2:27:36 PM UTC-4, Stella wrote:
>
> Hi, I am trying to pass parameter from Dashboard to modules. For my own 
> testing modules "createfile", it works fine: I can pass file_name variable 
> value from Dashboard to it.
>
> class createfile ($file_name=$::file_name) {
>
>     file {"/tmp/${file_name}":
>        ensure => present,
>        mode   => 644,
>        owner  => root,
>        group  => root,
>        content => "Hello, world2\n",
>     }
> }
>
> However, now I am trying to do the same to NTP module and can't get it to 
> work.
> I downloaded the NTP module from Puppet Forge. I am trying to control the 
> value of "service_ensure" from Dashboard, either "running" or "stopped". 
>
> The original structure is like this:
>
> In init.pp, $service_ensure is defined as a global variable with :: in 
> front of it:
> class ntp (
>   $service_ensure   = $ntp::params::service_ensure,
>
> In service.pp, it points to the service_ensure varible:
>  service { 'ntp':
>       ensure     => $service_ensure,
>
> In params.pp, it hardcoded the service_ensure as 'running"
> $service_ensure = 'running'
>
> So I thought I can just remove "running" from the params.pp and it should 
> then take the value I placed on Dashboard.
> But it doesn't work.
>
> I tried many combinations and still can't get it to work. 
> Any clue? 
> Many thanks!
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/7a363122-5e11-46a8-a0ed-05e237339688%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to