Permalink
Browse files

Merge pull request #88 from sidewinderlabs/feature/87-log-path

[#87] Create log directory if it doesn't exist.
  • Loading branch information...
2 parents f26f765 + b6e4676 commit de9c18e8a33723f6f5c434156fbe0686920be3c0 @tobami committed Mar 14, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 littlechef/solo.py
View
@@ -23,6 +23,7 @@
from littlechef.lib import credentials
from littlechef.settings import node_work_path, cookbook_paths
+from littlechef import LOGFILE as logging_path
# Path to local patch
@@ -73,6 +74,8 @@ def configure(current_node=None):
"Could not modify {0} dir. Do you have sudo rights?".format(
node_work_path))
# Set up chef solo configuration
+ if not exists(logging_path):
+ sudo('mkdir -p {0}'.format(logging_path))
if not exists('/etc/chef'):
sudo('mkdir -p /etc/chef')
# Set parameters and upload solo.rb template

0 comments on commit de9c18e

Please sign in to comment.