Permalink
Browse files

Fix default env value problems when using as a library

  • Loading branch information...
1 parent 489eee5 commit 9025a244127c262077a08112d6e5f454237d59d5 @tobami committed Jan 25, 2013
Showing with 4 additions and 2 deletions.
  1. +1 −1 littlechef/chef.py
  2. +3 −1 littlechef/runner.py
View
@@ -127,7 +127,7 @@ def _synchronize_node(configfile, node):
extra_opts += " --copy-links"
ssh_opts = ""
if env.ssh_config_path:
- ssh_opts += " -F %s" % env.ssh_config_path
+ ssh_opts += " -F %s" % os.path.expanduser(env.ssh_config_path)
if env.encrypted_data_bag_secret:
put(env.encrypted_data_bag_secret,
"/etc/chef/encrypted_data_bag_secret",
@@ -151,7 +151,7 @@ def deploy_chef(gems="no", ask="yes", version="0.10",
abort('Must specify both or neither of distro_type and distro')
if ask == "yes":
message = '\nAre you sure you want to install Chef {0}'.format(version)
- message += ' at the node {0}'.format(env.host_string)
+ message += ' on node {0}'.format(env.host_string)
if gems == "yes":
message += ', using gems for "{0}"?'.format(distro)
else:
@@ -441,3 +441,5 @@ def _readconfig():
else:
# runner module has been imported
env.ssh_config = None
+ env.follow_symlinks = False
+ env.encrypted_data_bag_secret = None

0 comments on commit 9025a24

Please sign in to comment.