Is there a way to stop and disable two services in one declaration? Currently I have this: # Stop sendmail service { "sendmail": ensure => stopped, enable => false, } # Stop exim service { "exim": ensure => stopped, enable => false, } Is it possible to format that like this?: service { "disabledemail": name => [''sendmail'', ''exim''], ensure => stopped, enable => false, } Thanks, Jonathan -- ---------------------------- Jonathan Gazeley Systems Support Specialist ResNet | Wireless & VPN Team IT Services University of Bristol ---------------------------- -- 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.
On Mon, May 16, 2011 at 12:16:53PM +0100, Jonathan Gazeley wrote:> Is there a way to stop and disable two services in one declaration? > Currently I have this: > > # Stop sendmail > service { "sendmail": > ensure => stopped, > enable => false, > } > > # Stop exim > service { "exim": > ensure => stopped, > enable => false, > } > > Is it possible to format that like this?: > > service { "disabledemail": > name => [''sendmail'', ''exim''], > ensure => stopped, > enable => false, > }Are you trying to have simultaneous stoppage or just save typing? You can achiev the latter by service { [ ''sendmail'', ''exim'' ]: ensure => stopped, enable => false, } -- Bruce What would Edward Woodward do? -- 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.
On Mon, May 16, 2011 at 7:16 AM, Jonathan Gazeley <jonathan.gazeley@bristol.ac.uk> wrote:> Is it possible to format that like this?: > > service { "disabledemail": > name => [''sendmail'', ''exim''], > ensure => stopped, > enable => false, > }I think you mean service {[ ''sendmail'', ''exim'']: ensure => stopped, enable => false, } -- 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.