Puppet: System Administration Automated

Support

Ticket #321 (closed enhancement: invalid)

Opened 2 years ago

Last modified 2 years ago

Service should accept an array for service name

Reported by: puppet Assigned to: luke
Priority: low Milestone:
Component: service Version:
Severity: normal Keywords: service multiple names
Cc: rijilv@gmail.com Triage Stage: Unreviewed
Attached Patches: None Complexity: Unknown

Description

If you do a:

service{ "foo" :

ensure => running, name => [ 'foo', 'bar' ]

}

puppet generates:

err: Found a bug: cannot convert Array into String

Not all packages that provide the same service provide the same name (MySQL.org packages generate 'mysql', while Red Hat? generates 'mysqld') and other services are comprised of multiple init scripts (courier-imap has 4). While the latter case can be achieved by defining multiple services, the former cannot.

The desired functionality would be for service to attempt to start each item in the array and return a success if one or more of the items was started.

Change History

04/19/07 22:46:11 changed by luke

  • status changed from new to closed.
  • specification set to Unnecessary.
  • patch set to None.
  • complexity set to Unknown.
  • approval set to Unnecessary.
  • resolution set to invalid.
  • compatibility set to Unknown.
  • stage set to Unreviewed.

You should define multiple service resources for this, or use a selector:

service{ $operatingsystem ? { redhat => foo, default => bar}:

    ensure => running

}