Details
-
Improvement
-
Status: Closed
-
Normal
-
Resolution: Won't Do
-
PUP 4.5.2
-
None
-
Night's Watch
Description
When I want to use multiple service providers on 1 machine (typically sys-v-init & upstart or systemd), I cannot use Service resource to do that.
For example, I want to replace sys-v-init script by upstart. With code like this:
service { 'abc_init':
|
name => 'abc',
|
ensure => 'stopped',
|
provider => 'redhat',
|
}
|
->
|
service { 'abc_upstart':
|
name => 'abc',
|
ensure => 'running',
|
provider => 'upstart',
|
}
|
I get this error:
Error: Evaluation Error: Error while evaluating a Resource Statement, Cannot alias Service[abc_upstart] to ["abc"] at manifest.pp:7; resource ["Service", "abc"] already declared at manifest.pp:1 at manifest.pp:7:1 on node foo.example.com
|
For Package resource it is already solved in 4.0.0+ (PUP-1073). Services are another case, when it makes sense as well.
Currently the only way is to use Exec to work around that, but it is not nice to write the command myself, when they are already implemented inside Service type.
Attachments
Issue Links
- relates to
-
PUP-1073 Support common package name in two different providers
-
- Closed
-