Don Jackson
2009-May-07 01:36 UTC
[Puppet Users] Starting a (SMF) service on Solaris with Puppet
Hello,
I am a puppet newbie, I got a puppetmaster running on my network, and
puppetd is installed and run on new servers.
I am trying to get puppet to start postfix on a Solaris server.
The postfix package was previously installed (via jumpstart).
When the system first comes up, if I type
svcadm enable svc:/network/postfix:default
then postfix starts and runs fine. But I want puppet to do that for
me automatically.
Here is what I put in my manifest file:
file { "password":
name => "/etc/passwd",
owner => "root",
group => $operatingsystem ? {
OpenBSD => "wheel",
Solaris => "sys",
},
mode => 644,
}
node ''solaristest.clark-communications.com'' {
service { "postfix":
enable => "true",
start => "true",
ensure => "running",
}
}
But that doesn''t seem to work, here is what puppetd says:
/opt/csw/bin/puppetd --no-daemonize --debug
debug: Creating default schedules
debug: Failed to load library ''shadow'' for feature
''libshadow''
debug: Failed to load library ''ldap'' for feature
''ldap''
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/public_keys]: Autorequiring File[/etc/opt/csw/
puppet/ssl]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/
File[/var/opt/csw/puppet/lib]: Autorequiring File[/var/opt/csw/puppet]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/
File[/etc/opt/csw/puppet/ssl]: Autorequiring File[/etc/opt/csw/puppet]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/private_keys/solaristest.clark-
communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/
private_keys]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/certs]: Autorequiring File[/etc/opt/csw/puppet/
ssl]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/
File[/var/opt/csw/puppet/state/classes.txt]: Autorequiring File[/var/
opt/csw/puppet/state]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/private]: Autorequiring File[/etc/opt/csw/
puppet/ssl]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/private_keys]: Autorequiring File[/etc/opt/csw/
puppet/ssl]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/
File[/var/opt/csw/puppet/state/state.yaml]: Autorequiring File[/var/
opt/csw/puppet/state]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/
File[/var/opt/csw/puppet/state]: Autorequiring File[/var/opt/csw/puppet]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/
File[/var/opt/csw/puppet/log]: Autorequiring File[/var/opt/csw/puppet]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/certs/solaristest.clark-
communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/
certs]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/
File[/var/opt/csw/puppet/run]: Autorequiring File[/var/opt/csw/puppet]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/File[/
etc/opt/csw/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/opt/csw/
puppet/ssl/certs]
debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/
File[/etc/opt/csw/puppet/puppet.conf]: Autorequiring File[/etc/opt/csw/
puppet]
debug: Finishing transaction 69170270 with 0 changes
notice: Starting Puppet client version 0.24.8
debug: Loaded state in 0.00 seconds
debug: Retrieved facts in 3.09 seconds
debug: Retrieving catalog
debug: Calling puppetmaster.getconfig
debug: Retrieved catalog in 0.35 seconds
debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update
does not exist
debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update-
rc.d does not exist
debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not
exist
debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc
does not exist
debug: Puppet::Type::Service::ProviderRedhat: file /sbin/service does
not exist
debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl
does not exist
debug: Creating default schedules
debug: Finishing transaction 74131070 with 0 changes
info: Caching catalog at /var//opt/csw/puppet/state/localconfig.yaml
notice: Starting catalog run
debug: Loaded state in 0.00 seconds
debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l
postfix''
debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l
postfix''
debug: //Node[solaristest.clark-communications.com]/Service[postfix]:
Changing ensure
debug: //Node[solaristest.clark-communications.com]/Service[postfix]:
1 change(s)
debug: Service[postfix](provider=smf): Executing ''true''
debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l
postfix''
debug: Service[postfix](provider=smf): Executing ''true''
notice: //Node[solaristest.clark-communications.com]/Service[postfix]/
ensure: ensure changed ''stopped'' to
''running''
debug: Finishing transaction 74115530 with 1 changes
debug: Storing state
debug: Stored state in 0.02 seconds
notice: Finished catalog run in 1.16 seconds
But after the puppetd run, postfix is NOT running on the machine.
Any advice appreciated.
Don
--~--~---------~--~----~------------~-------~--~----~
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---
Jim Pirzyk
2009-May-07 01:47 UTC
[Puppet Users] Re: Starting a (SMF) service on Solaris with Puppet
I believe you do not need start => true you may need to set the name though: name => ''svc:/network/postfix:default'' unless ''svcadm enable postfix'' works as is (I do not have postfix on my servers, but I can do ''svcadm enable smtp'' The enable => true means to execute the ''svcadm enable $name'' - JimP On May 6, 2009, at 9:36 PM, Don Jackson wrote:> > Hello, > > I am a puppet newbie, I got a puppetmaster running on my network, and > puppetd is installed and run on new servers. > > I am trying to get puppet to start postfix on a Solaris server. > > The postfix package was previously installed (via jumpstart). > > When the system first comes up, if I type > > svcadm enable svc:/network/postfix:default > > then postfix starts and runs fine. But I want puppet to do that for > me automatically. > > Here is what I put in my manifest file: > > file { "password": > name => "/etc/passwd", > owner => "root", > group => $operatingsystem ? { > OpenBSD => "wheel", > Solaris => "sys", > }, > mode => 644, > } > > node ''solaristest.clark-communications.com'' { > service { "postfix": > enable => "true", > start => "true", > ensure => "running", > } > } > > But that doesn''t seem to work, here is what puppetd says: > > /opt/csw/bin/puppetd --no-daemonize --debug > debug: Creating default schedules > debug: Failed to load library ''shadow'' for feature ''libshadow'' > debug: Failed to load library ''ldap'' for feature ''ldap'' > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/public_keys]: Autorequiring File[/etc/opt/csw/ > puppet/ssl] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ > File[/var/opt/csw/puppet/lib]: Autorequiring File[/var/opt/csw/puppet] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ > File[/etc/opt/csw/puppet/ssl]: Autorequiring File[/etc/opt/csw/puppet] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/private_keys/solaristest.clark- > communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/ > private_keys] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/certs]: Autorequiring File[/etc/opt/csw/puppet/ > ssl] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ > File[/var/opt/csw/puppet/state/classes.txt]: Autorequiring File[/var/ > opt/csw/puppet/state] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/private]: Autorequiring File[/etc/opt/csw/ > puppet/ssl] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/private_keys]: Autorequiring File[/etc/opt/csw/ > puppet/ssl] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ > File[/var/opt/csw/puppet/state/state.yaml]: Autorequiring File[/var/ > opt/csw/puppet/state] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ > File[/var/opt/csw/puppet/state]: Autorequiring File[/var/opt/csw/ > puppet] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ > File[/var/opt/csw/puppet/log]: Autorequiring File[/var/opt/csw/puppet] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/certs/solaristest.clark- > communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/ > certs] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ > File[/var/opt/csw/puppet/run]: Autorequiring File[/var/opt/csw/puppet] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ > File[/ > etc/opt/csw/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/opt/csw/ > puppet/ssl/certs] > debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ > File[/etc/opt/csw/puppet/puppet.conf]: Autorequiring File[/etc/opt/ > csw/ > puppet] > debug: Finishing transaction 69170270 with 0 changes > notice: Starting Puppet client version 0.24.8 > debug: Loaded state in 0.00 seconds > debug: Retrieved facts in 3.09 seconds > debug: Retrieving catalog > debug: Calling puppetmaster.getconfig > debug: Retrieved catalog in 0.35 seconds > debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update > does not exist > debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update- > rc.d does not exist > debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does not > exist > debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc > does not exist > debug: Puppet::Type::Service::ProviderRedhat: file /sbin/service does > not exist > debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl > does not exist > debug: Creating default schedules > debug: Finishing transaction 74131070 with 0 changes > info: Caching catalog at /var//opt/csw/puppet/state/localconfig.yaml > notice: Starting catalog run > debug: Loaded state in 0.00 seconds > debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l > postfix'' > debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l > postfix'' > debug: //Node[solaristest.clark-communications.com]/Service[postfix]: > Changing ensure > debug: //Node[solaristest.clark-communications.com]/Service[postfix]: > 1 change(s) > debug: Service[postfix](provider=smf): Executing ''true'' > debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs -l > postfix'' > debug: Service[postfix](provider=smf): Executing ''true'' > notice: //Node[solaristest.clark-communications.com]/Service[postfix]/ > ensure: ensure changed ''stopped'' to ''running'' > debug: Finishing transaction 74115530 with 1 changes > debug: Storing state > debug: Stored state in 0.02 seconds > notice: Finished catalog run in 1.16 seconds > > But after the puppetd run, postfix is NOT running on the machine. > > Any advice appreciated. > > Don > > > --~--~---------~--~----~------------~-------~--~----~ > 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 > +unsubscribe@googlegroups.com > For more options, visit this group at http://groups.google.com/ > group/puppet-users?hl=en > -~----------~----~----~----~------~----~------~--~------ @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $ __o jim@pirzyk.org ------------------------------------------- _''\<,_ (*)/ (*) I''d rather be out biking. --- @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $ __o jim@pirzyk.org ------------------------------------------- _''\<,_ (*)/ (*) I''d rather be out biking.
Don Jackson
2009-May-07 05:55 UTC
[Puppet Users] Re: Starting a (SMF) service on Solaris with Puppet
On May 6, 2009, at 6:47 PM, Jim Pirzyk wrote:> I believe you do not need > > start => true > > you may need to set the name though: > > name => ''svc:/network/postfix:default'' > > unless ''svcadm enable postfix'' works as is (I do not have postfix on > my servers, but I can do ''svcadm enable smtp'' > > The enable => true means to execute the ''svcadm enable $name''I implemented both your suggestions, and it worked! Thank you! Don>> >> Hello, >> >> I am a puppet newbie, I got a puppetmaster running on my network, and >> puppetd is installed and run on new servers. >> >> I am trying to get puppet to start postfix on a Solaris server. >> >> The postfix package was previously installed (via jumpstart). >> >> When the system first comes up, if I type >> >> svcadm enable svc:/network/postfix:default >> >> then postfix starts and runs fine. But I want puppet to do that for >> me automatically. >> >> Here is what I put in my manifest file: >> >> file { "password": >> name => "/etc/passwd", >> owner => "root", >> group => $operatingsystem ? { >> OpenBSD => "wheel", >> Solaris => "sys", >> }, >> mode => 644, >> } >> >> node ''solaristest.clark-communications.com'' { >> service { "postfix": >> enable => "true", >> start => "true", >> ensure => "running", >> } >> } >> >> But that doesn''t seem to work, here is what puppetd says: >> >> /opt/csw/bin/puppetd --no-daemonize --debug >> debug: Creating default schedules >> debug: Failed to load library ''shadow'' for feature ''libshadow'' >> debug: Failed to load library ''ldap'' for feature ''ldap'' >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/public_keys]: Autorequiring File[/etc/opt/csw/ >> puppet/ssl] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ >> File[/var/opt/csw/puppet/lib]: Autorequiring File[/var/opt/csw/ >> puppet] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ >> File[/etc/opt/csw/puppet/ssl]: Autorequiring File[/etc/opt/csw/ >> puppet] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/private_keys/solaristest.clark- >> communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/ >> private_keys] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/certs]: Autorequiring File[/etc/opt/csw/ >> puppet/ >> ssl] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ >> File[/var/opt/csw/puppet/state/classes.txt]: Autorequiring File[/var/ >> opt/csw/puppet/state] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/private]: Autorequiring File[/etc/opt/csw/ >> puppet/ssl] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/private_keys]: Autorequiring File[/etc/opt/ >> csw/ >> puppet/ssl] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ >> File[/var/opt/csw/puppet/state/state.yaml]: Autorequiring File[/var/ >> opt/csw/puppet/state] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ >> File[/var/opt/csw/puppet/state]: Autorequiring File[/var/opt/csw/ >> puppet] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ >> File[/var/opt/csw/puppet/log]: Autorequiring File[/var/opt/csw/ >> puppet] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/certs/solaristest.clark- >> communications.com.pem]: Autorequiring File[/etc/opt/csw/puppet/ssl/ >> certs] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[main]/ >> File[/var/opt/csw/puppet/run]: Autorequiring File[/var/opt/csw/ >> puppet] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[ssl]/ >> File[/ >> etc/opt/csw/puppet/ssl/certs/ca.pem]: Autorequiring File[/etc/opt/ >> csw/ >> puppet/ssl/certs] >> debug: /Settings[/etc//opt/csw/puppet/puppet.conf]/Settings[puppetd]/ >> File[/etc/opt/csw/puppet/puppet.conf]: Autorequiring File[/etc/opt/ >> csw/ >> puppet] >> debug: Finishing transaction 69170270 with 0 changes >> notice: Starting Puppet client version 0.24.8 >> debug: Loaded state in 0.00 seconds >> debug: Retrieved facts in 3.09 seconds >> debug: Retrieving catalog >> debug: Calling puppetmaster.getconfig >> debug: Retrieved catalog in 0.35 seconds >> debug: Puppet::Type::Service::ProviderGentoo: file /sbin/rc-update >> does not exist >> debug: Puppet::Type::Service::ProviderDebian: file /usr/sbin/update- >> rc.d does not exist >> debug: Puppet::Type::Service::ProviderRunit: file /usr/bin/sv does >> not >> exist >> debug: Puppet::Type::Service::ProviderDaemontools: file /usr/bin/svc >> does not exist >> debug: Puppet::Type::Service::ProviderRedhat: file /sbin/service does >> not exist >> debug: Puppet::Type::Service::ProviderLaunchd: file /bin/launchctl >> does not exist >> debug: Creating default schedules >> debug: Finishing transaction 74131070 with 0 changes >> info: Caching catalog at /var//opt/csw/puppet/state/localconfig.yaml >> notice: Starting catalog run >> debug: Loaded state in 0.00 seconds >> debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs >> -l >> postfix'' >> debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs >> -l >> postfix'' >> debug: //Node[solaristest.clark-communications.com]/Service[postfix]: >> Changing ensure >> debug: //Node[solaristest.clark-communications.com]/Service[postfix]: >> 1 change(s) >> debug: Service[postfix](provider=smf): Executing ''true'' >> debug: Puppet::Type::Service::ProviderSmf: Executing ''/usr/bin/svcs >> -l >> postfix'' >> debug: Service[postfix](provider=smf): Executing ''true'' >> notice: //Node[solaristest.clark-communications.com]/ >> Service[postfix]/ >> ensure: ensure changed ''stopped'' to ''running'' >> debug: Finishing transaction 74115530 with 1 changes >> debug: Storing state >> debug: Stored state in 0.02 seconds >> notice: Finished catalog run in 1.16 seconds >> >> But after the puppetd run, postfix is NOT running on the machine. >> >> Any advice appreciated. >> >> Don >> >> >> > > --- @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $ > __o jim@pirzyk.org ------------------------------------------- > _''\<,_ > (*)/ (*) I''d rather be out biking. > > > > --- @(#) $Id: dot.signature,v 1.15 2007/12/27 15:06:13 pirzyk Exp $ > __o jim@pirzyk.org ------------------------------------------- > _''\<,_ > (*)/ (*) I''d rather be out biking. >--~--~---------~--~----~------------~-------~--~----~ 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---