Hi all,
I have a new module idea but no implementation at all. This email is
just a problem presentation.
Recently, DevOps people in Japan begin to use serverspec[1] to test
target host environment.
The serverspec is written in RSpec. Below is an example about httpd is
installed and working correctly.
describe package('httpd') do
it { should be_installed }
describe service('httpd') do
it { should be_enabled }
it { should be_running }
end
describe port(80) do
it { should be_listening }
end
describe file('/etc/httpd/conf/httpd.conf') do
it { should be_file }
it { should contain "ServerName www.example.jp" }
end
You may think "This is same as PlayBooks. I don't need it". But this
is "Test for Playbook(or Recipe)". Many people accept "Test for source
code", why not this?
serverspec is written in Ruby, and many people are using with Chef.
But if it with Ansible, we can
- check current environment before play
- or, check the environment is correct after play
- or, if the environment is different from the assumption, send a notification
by using notification modules.
So, I want to ask you who are interested in the Configuration Management,
1. What do you think about this kind of test tool (in general)?
2. How about to add this type of tool as ansible module?
3. If this idea is good, how to implement and write test configuration?
(we should re-implement by Python)
I have written a similar tool on top of the fabric, called envassert[2].
But I think this implementation is not so good because of lack of test
suite and less functionality.
Currently I have no time to design and implement. If someone thinks
this is good and try to implement, I appreciate.
Any thought?
Regards,
WAKAYAMA Shirou
[1] http://serverspec.org/
[2] https://bitbucket.org/r_rudi/envassert