Serverspec new matchers: Part 1

Monday, Aug 18, 2014 17:08 · 315 words · 2 minutes read

Serverspec Series

  1. Getting started with Serverspec
  2. Serverspec new matchers: Part 1
  3. Serverspec new matchers: Part 2

As I wrote in my previous post, Serverspec allows users to describe the machine setup using many different resource types. There are lots of resource types already implemented in the framework but based on the setup, which should be described, they can be insufficient.

The good thing about Serverspec is that it is easily extensible. Recently I have added several new matchers and resource types, which I will describe in the next few blog posts.

Lets start with iis_app_pool resource type and its new matchers.

iis_app_pool

IIS Application Pool resource type

have_32bit_enabled

In order to test the IIS Application pool, whether the Enable 32-Bit Applications option is enabled, you should use the have_32bit_enabled matcher.

have_idle_timeout

In order to test the IIS Application pool Idle Time-out setting, you should use the have_idle_timeout matcher(in minutes).

have_identity_type

In order to test the IIS Application pool Identity type (which configures how the app pool runs), you should use the have_identity_type matcher.

have_periodic_restart

In order to test the IIS Application pool Regular Time Interval, you should use the have_periodic_restart matcher(in minutes).

have_user_profile_enabled

In order to test the IIS Application pool Load User Profile setting, you should use the have_user_profile_enabled matcher.

have_username

In order to test the IIS Application pool username specified in case of Specific User used, you should use the have_username matcher.

have_managed_pipeline_mode

In order to test the IIS Application pool Managed Pipeline Mode, you should use the have_managed_pipeline_mode matcher.

started

In order to test whether the IIS Application pool is started, you should use the started matcher.

In my next blog post I will have a look at the matchers for the iis_website and service resource types together with the two new resource types event_log and perf_counter types.

Note: The matchers described above can found in the Serverspec gem 1.14 and above.

comments powered by Disqus

Buy Me A Coffee