On 3/26/15 1:17 AM, Felix Frank 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
>>
>
Hi,
+1 to Felix's hack for getting this working.
It appears[1] that systemd should work without modification on FC19.
James, what version of facter do you have? Most importantly does it have
a fact for operatingsystemmajrelease?
Looks like the redhat provider would also match[2]. Anyone know how
precedence is determined?
[1] -
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/systemd.rb#L10
[2] -
https://github.com/puppetlabs/puppet/blob/master/lib/puppet/provider/service/redhat.rb#L11
Best regards,
-g
--
Garrett Honeycutt
@learnpuppet
Puppet Training with LearnPuppet.com
Mobile: +1.206.414.8658
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/551418FD.7030101%40garretthoneycutt.com.
For more options, visit https://groups.google.com/d/optout.