Permalink
Browse files

changed roles setup to execute immediately, no need for it to be in a…

… function
  • Loading branch information...
1 parent f475b87 commit 0924b9abfdbb53b7af3c39b48c24c1b9acf7a0b9 @blturner committed Mar 31, 2012
Showing with 8 additions and 10 deletions.
  1. +8 −10 stitch/fabfile.py
View
@@ -34,16 +34,14 @@ def render_jinja(template, context, filename):
f.write(t.render(c))
-def setup_roles():
- for role, hosts in env.conf['roles'].iteritems():
- if isinstance(hosts, str):
- hosts = [hosts]
-
- env.roledefs[role] = []
- for host in hosts:
- env.roledefs[role].append(env.conf['hosts'][host].get('hostname'))
- env.local = False
-setup_roles()
+for role, hosts in env.conf['roles'].iteritems():
+ if isinstance(hosts, str):
+ hosts = [hosts]
+
+ env.roledefs[role] = []
+ for host in hosts:
+ env.roledefs[role].append(env.conf['hosts'][host].get('hostname'))
+env.local = False
def get_host_dict(hostname):

0 comments on commit 0924b9a

Please sign in to comment.