If you own the manifest already, you can set properties there

Otherwise, you can do what we do and use an exec - not efficient, but it
works

    exec { 'syslog_remote':
        command => "svccfg -s svc:/system/system-log setprop
config/log_from_remote = $syslog_from_remote \
            || { svccfg -s svc:/system/system-log addpg config application;
svccfg -s svc:/system/system-log setprop config/log_from_remote = boolean:
$syslog_from_remote; }",
        unless  => "svccfg -s svc:/system/system-log listprop
config/log_from_remote 2>&1 | grep \"^config/log_from_remote * boolean *
$syslog_from_remote\"",
        notify  => Service['syslogd'],
        path    => '/usr/sbin:/bin:/usr/bin',
    }

John

On 7 October 2010 08:21, Philip Brown <phil.googlen...@bolthole.com> wrote:

> Hello folks,
> I've been looking into how I might check (and possibly set) svc
> properties via puppet.
> The closest I've found, is the provider/service/smf stuff.
> However, that seems to only allow enabling and disabling of services.
> NOT of configuring properties.
>
> Is there some way I dont know of, how to do that?
>
> If not, and I need to write something... under which module/plugin/
> whatever should I attempt to write one?
>
> To give an example of what I want to do:
>
>
> 1. Check if
>  `svcprop -p defaults/tcp_wrappers inetd`  == true
>
>
> 2. If NOT.. either complain loudly, or automatically fix it.
>
> It isn't exactly a service... it's a configuration, or property,
> associated with a service.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
>


-- 
John Warburton
Ph: 0417 299 600
Email: jwarbur...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-us...@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