diff --git a/composition.py b/composition.py index ae0cb4a..4ef9e9b 100644 --- a/composition.py +++ b/composition.py @@ -1,5 +1,6 @@ from fabric.api import run, local + def run_tests(): local("echo running tests") # local("false") diff --git a/context_managers.py b/context_managers.py index e64b0f8..0f087f1 100644 --- a/context_managers.py +++ b/context_managers.py @@ -5,6 +5,7 @@ env.roledefs = { 'db': ['db1', 'db2'] } + def cd_example(): with cd('/tmp'): run('pwd') diff --git a/func.py b/func.py index c18d779..6555e42 100644 --- a/func.py +++ b/func.py @@ -1,4 +1,5 @@ from fabric.api import run + def hello(): run("ls") diff --git a/hosts.py b/hosts.py index 64f84c1..22fbbae 100644 --- a/hosts.py +++ b/hosts.py @@ -2,5 +2,6 @@ from fabric.api import env, run env.hosts = ['web1', 'web2', 'web3'] + def hello(): run('hostname') diff --git a/roldefs.py b/roldefs.py index 58f04e1..943908d 100644 --- a/roldefs.py +++ b/roldefs.py @@ -1,8 +1,10 @@ from fabric.api import env, run + env.roledefs = { 'web': ['web1', 'web2', 'web3'], 'db': ['db1', 'db2'] } + def hello(): run('hostname') diff --git a/super_composition.py b/super_composition.py index 7f14604..e372a1a 100644 --- a/super_composition.py +++ b/super_composition.py @@ -1,5 +1,6 @@ from fabric.api import run, local + def run_tests(): local("echo running tests") # local("false")