Created
October 6, 2011 20:52
-
-
Save bradland/1268644 to your computer and use it in GitHub Desktop.
User verifier for Sprinkle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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