Thanks Felix, I figured the work around out, but its good to see a
response.   I think Fedora 19 is by default configured to use systemd.
   I suppose I should look inside the code that handles the Service
resource to figure out how it detects what should be the default
provider.

Thanks again...James

On Wed, Mar 25, 2015 at 8:17 PM, Felix Frank
<felix.fr...@alumni.tu-berlin.de> wrote:
> Hi,
>
> it sure is disappointing that the most recent agent version will not
> select the correct default provider on your FC19. Is systemd default on
> this platform? Or have you configured this box this way explicitly.
>
> If you want your manifest to behave like this on your FC19 boxen only,
> you can do this on the global scope (e.g., site.pp)
>
> if $operatingsystem == 'Fedora' and $operatingsystemmajrelease == '19' {
>     Service { provider => 'systemd' }
> }
>
> This sets a resource default if the node in question uses the specified
> operating system.
>
> HTH,
> Felix
>
> On 03/13/2015 03:05 PM, James Olin Oden wrote:
>> I am on Fedora Core 19 using Puppet version 3.7.4.
>>
>> When I was trying ensure a service was configured to start I would do
>> something like:
>>
>>    service { 'someservice':
>>        ensure => 'running',
>>        enable => true,
>>    }
>>
>> But when I would run puppet apply I would get the following error:
>>
>>    Error: Could not enable someservice: Execution of '/sbin/chkconfig
>> --add someservice'
>>    returned 1: error reading information on service someservice: No such 
>> file or
>> directory
>>    Error: /Stage[main]/Firewall::Linux::Redhat/Service[someservice]/ensure:
>> change
>> from stopped to running failed: Could not enable someservice: Execution of
>> '/sbin/chkconfig --add someservice' returned 1: error reading information on
>> service someservice: No such file or directory
>>
>> However if I told it the provider like:
>>
>>
>>    service { 'someservice':
>>        ensure => 'running',
>>        enable => true,
>>        provider => 'systemd',
>>    }
>>
>> The puppet apply would work fine.   This however makes my resource non
>> portable to systems not using systemd.   Is this a bug of some sort?
>> Am I doing something wrong?
>>
>> Thanks...James
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/55135030.5070104%40Alumni.TU-Berlin.de.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/CAPWHxf%2BTHBnoyBv6s-SSZT1muY_5jzgofnns4c2uDDR54iBVdg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to