Fix sysfs service idempotency

Sysfs is kind of "apply params" service, so status should always
return true. Service's resource will prefer the 'status' parameter,
then 'statuscmd' method, then look in the process table.

Partial-Bug: #1524724
Change-Id: I8a13ac4a227195cfb16be89c8fb0a9a9ec3ba1f0
This commit is contained in:
Michael Polenchuk 2016-03-14 15:11:13 +03:00
parent 77a59478b7
commit d040c126d9
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class sysfs::service inherits sysfs::params {
service { 'sysfsutils' :
ensure => 'running',
enable => true,
hasstatus => false,
status => '/bin/true',
hasrestart => true,
}

View File

@ -20,7 +20,7 @@ describe 'sysfs::service' do
should contain_service('sysfsutils').with(
:ensure => 'running',
:enable => true,
:hasstatus => false,
:status => '/bin/true',
:hasrestart => true)
end
end