Skip to content

Instantly share code, notes, and snippets.

@hashimotor
Created July 14, 2013 07:23
Show Gist options
  • Save hashimotor/5993501 to your computer and use it in GitHub Desktop.
Save hashimotor/5993501 to your computer and use it in GitHub Desktop.
serverspecのexampleをenvassertで書くと
from fabric.api import task
from envassert import file, process, package, port
@task
def apache2():
assert package.installed("apache2")
assert service.is_enabled("apache2")
assert service.is_up("apache2")
assert port.is_listening(80)
assert file.is_file("/etc/apache2/httpd.conf")
assert file.has_line("/etc/apache2/httpd.conf", "ServerName localhost")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment