RHEL 6 VM inspec service runlevels error


#1

Im running a simple chef inspec describe statement on a RHEL 6 VM target and I get this error blocking the example from even running:

block in load': undefined methodrunlevels’ for Service sshd

Here’s the code im running which is copied EXACTLY from chef inspec document:

describe service(‘sshd’).runlevels(2,4) do
it { should be_enabled }
end


#2

Does this work?

describe service(‘sshd’) do
it { should be_enabled.with_level(2) }
it { should be_enabled.with_level(4) }
end


#3

no it says [UNSOPPURTED] with level is not supported in the inspec results


#4

Please give more information, like test platform version, chef dk version and the whole kitchen log