Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #125 from pawelpacana/ssh-config

If ssh config is provided, pass it to fabric as well.
Fixes #124
  • Loading branch information...
commit 02f9567df61199b4ed0e41b362624021c67238a7 2 parents 24ce28b + f2ae192
Miquel Torres authored
Showing with 9 additions and 2 deletions.
  1. +4 −0 littlechef/chef.py
  2. +5 −2 littlechef/runner.py
4 littlechef/chef.py
View
@@ -125,11 +125,15 @@ def _synchronize_node(configfile, node):
extra_opts = "-q"
if env.follow_symlinks:
extra_opts += " --copy-links"
+ ssh_opts = ""
+ if env.ssh_config_path:
+ ssh_opts += " -F %s" % env.ssh_config_path
rsync_project(
env.node_work_path, './cookbooks ./data_bags ./roles ./site-cookbooks',
exclude=('*.svn', '.bzr*', '.git*', '.hg*'),
delete=True,
extra_opts=extra_opts,
+ ssh_opts=ssh_opts
)
_add_search_patch()
7 littlechef/runner.py
View
@@ -347,8 +347,11 @@ def _readconfig():
if ssh_config:
env.ssh_config = _SSHConfig()
+ env.ssh_config_path = os.path.expanduser(ssh_config)
+ env.use_ssh_config = True
+
try:
- env.ssh_config.parse(open(os.path.expanduser(ssh_config)))
+ env.ssh_config.parse(open(env.ssh_config_path))
except IOError:
msg = "Couldn't open the ssh-config file '{0}'".format(ssh_config)
abort(msg)
@@ -389,7 +392,7 @@ def _readconfig():
else:
if not env.node_work_path:
abort('The "node_work_path" option cannot be empty')
-
+
# Follow symlinks
try:
env.follow_symlinks = config.getboolean('kitchen', 'follow_symlinks')
Please sign in to comment.
Something went wrong with that request. Please try again.