Skip to content

Instantly share code, notes, and snippets.

@bradland
Created Oct 6, 2011
Embed
What would you like to do?
User verifier for Sprinkle
module Sprinkle
module Verifiers
# = Process Verifier
#
# Contains a verifier to check that a process is running.
#
# == Example Usage
#
# verify { has_user 'nginx' }
#
module User
Sprinkle::Verify.register(Sprinkle::Verifiers::User)
# Checks to make sure <tt>user</tt> is a user
# on the remote server.
def has_user(user)
@commands << "getent passwd #{user}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment