You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The resource describe service only works with the argument it { should be_installed }, for all others like {be_enabled} and {be_running}, the resource is giving wrong info.
InSpec and Platform Version
Host info
inspec version
0.32.0
Mac OS X El Capitan 10.11.6
RVM 1.26.11
rvm rubies =* ruby-2.2.2 [ x86_64 ]
Target info
Suse Linux Enterprise Server 11 SP2, 3 and 4
Replication Case
With this single test it will report that service is installed, but for be_enabled and be_running fails, even if the service is up and chkconfig reports on status.
test.rb
describe service('autofs') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
Possible Solutions
If you have already ideas how to solve the issue, add them here.
Stacktrace
$ inspec exec controls/automounter.rb -t ssh://i844059@mo-f691eaa45 -i ~/.ssh/id_rsa
Target: ssh://i844059@mo-f691eaa45:22
✖ autofs.0: Check for automounter (2 failed)
✖ expected that `Service autofs` is enabled
✖ expected that `Service autofs` is running
✔ Service autofs should be installed
Inside an ssh session on the target host
mo-f691eaa45:/home/i844059 # /etc/init.d/autofs status
Checking for service running
mo-f691eaa45:/home/i844059 # chkconfig --list autofs
autofs 0:off 1:off 2:off 3:on 4:off 5:on 6:off
The text was updated successfully, but these errors were encountered:
@JuanMtz79 Thanks for reporting. Suse is storing the rc levels in /etc/init.d/rc*.d, but we were only expecting them in /etc/rc*.d. #1007 is up and fixes that issue.
Description
The resource describe service only works with the argument it { should be_installed }, for all others like {be_enabled} and {be_running}, the resource is giving wrong info.
InSpec and Platform Version
Host info
inspec version
0.32.0
Mac OS X El Capitan 10.11.6
RVM 1.26.11
rvm rubies =* ruby-2.2.2 [ x86_64 ]
Target info
Suse Linux Enterprise Server 11 SP2, 3 and 4
Replication Case
With this single test it will report that service is installed, but for be_enabled and be_running fails, even if the service is up and chkconfig reports on status.
test.rb
describe service('autofs') do
it { should be_installed }
it { should be_enabled }
it { should be_running }
end
Possible Solutions
If you have already ideas how to solve the issue, add them here.
Stacktrace
The text was updated successfully, but these errors were encountered: