Skip to content

Instantly share code, notes, and snippets.

@bradland
Created October 6, 2011 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bradland/1268644 to your computer and use it in GitHub Desktop.
Save bradland/1268644 to your computer and use it in GitHub Desktop.
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