Created
July 14, 2013 07:23
-
-
Save hashimotor/5993501 to your computer and use it in GitHub Desktop.
serverspecのexampleをenvassertで書くと
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
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