Permalink
Browse files

Further parallel output fixes

  • Loading branch information...
1 parent bfcfe58 commit e4b9f394ba1e6a2a986d7a5f8bf8e861cf5d9fde @tobami committed Jan 28, 2013
Showing with 7 additions and 4 deletions.
  1. +7 −4 littlechef/chef.py
View
@@ -105,7 +105,10 @@ def _synchronize_node(configfile, node):
Returns the node object of the node which is about to be configured,
or None if this node object cannot be found.
"""
- print "[{0}]: Synchronizing node, cookbooks, roles and data bags...".format(env.host_string)
+ msg = "Synchronizing node, cookbooks, roles and data bags..."
+ if env.parallel:
+ msg = "[{0}]: {1}".format(env.host_string, msg)
+ print(msg)
# First upload node.json
remote_file = '/etc/chef/node.json'
put(configfile, remote_file, use_sudo=True, mode=400)
@@ -334,10 +337,10 @@ def _add_search_patch():
def _configure_node():
"""Exectutes chef-solo to apply roles and recipes to a node"""
- msg = "\n"
+ msg = "Cooking..."
if env.parallel:
- msg += "[{0}]: "
- msg += "Cooking...".format(env.host_string)
+ msg = "[{0}]: {1}".format(env.host_string, msg)
+ print("")
print(msg)
# Backup last report
with settings(hide('stdout', 'warnings', 'running'), warn_only=True):

0 comments on commit e4b9f39

Please sign in to comment.