Hi All,
I was trying the tutorial on inspec.io http://www.anniehedgie.com/inspec-basics-9
I have created attribute yaml below content.
In attributes.yml
role : base
The inspec rb file is as below
if [‘server’, ‘base’].include? role
control “Testing only server” do
title “Tests for Server”
desc “The following tests within this control will be used for server nodes.”
describe user(‘server’) do
it { should exist }
end
end
end
Executing as below
inspec exec . --attrs attributes/client-attributes.yml
But this gives me error saying role does not exists ideally it should pick up role value from attributes.yml
Could anyone please help me with this?
Thanks and Regards,
Pankaj