Referring to : http://scienceofficersblog.blogspot.com/2016/02/testing-ansible-with-inspec.html
There are so many posts mentioning use of Chef inspec for Ansible testing. But they usually give example like:
Ansible:
- hosts: all
user: root
tasks:
- debug: msg="debug {{inventory_hostname}}"
- apt: name=apache2 state=present
Chef Inspec:
impact 0.7
title "Test some simple resources"
describe package('apache2') do
it { should be_installed }
end
So, if I execute the same Ansible block it will give me surety that the apache2 package is installed. Similarly there are so many examples like port 80 should be open, for that also if we execute the same playbook in chech mode (dry run) then also I will get to know whether port 80 is listening or not.
So, why can't we use Ansible itself? and what is the exact necessity of Chef inspec when we can do almost everything by using Ansible ?