So far Serverspec is working out great. I'm testing my servers, everything looks good.
Let's say I want to test my LDAP cluster via running a few LDAP commands from my local workstation, say ldapsearch
. The reason I would do this on my workstation rather than any of the servers is to ensure everything works remotely, including load balancing.
What's the convention? How is this accomplished? What changes would I have to make to my Rakefile
? I have generated a Rakefile
via serverspec-init
. Any examples of this somewhere?
As far as I understand,
serverspec
is a tool to check servers' configuration state for correctness and make sure that it is in the desired state. This is achieved by logging into the server and executing commands that check given configuration items/values and returns output. So, I have my doubts if serverspec is the right tool for what you want to do.The site's about section states:
The only option close to what you are looking for seems to me, is to use the
command
resourc type to run and check the ouptput of some commands you wish to. http://serverspec.org/resource_types.html#commandYou could set a command that runs on loopback(127.0.0.1) rather than the external server. It'll still ssh locally but it'll do what you need.