I am using chef inspc to verify the the AMI Images created using packer to fit out standards. One of the requirement is checking the version difference between AMI images.
I have the following code which checks for ansible version 2.8.
control 'Ansible check' do
impact 1.0
title 'Check anisble is installed'
describe package('ansible') do
it { should be_installed }
its('version') { should match (/2.8.*/) }
end
end
However I need to get the full version variable to check difference between AMIs. Ex 2.8.8
Is there a way to get the version variable outputted in the inspec report function or do I have to use another tools to do this?
Thanks in advance.