#5·orca

Ability to change node config at runtime

Author: andykentCreated Jun 29, 2013Updated Jun 29, 2013
Labelsenhancement

Sometimes it's useful to be able to change a nodes config in the middle of a run. As an example if you want to change the port ssh is running on. In this situation you would want to make node changes and then force a reconnect with the new credentials.

Currently this is possible but it's pretty hacky, I suggest a node.change(opts) method that gets merged into the nodes config and then force a reconnect.

node.change :user => ‘deploy’, :port => 123

Additionally it might be possible for this method to take a block which is called immediately and is expected to trigger a disconnect to save you from having to capture any connection errors.

node.change :user => ‘deploy’, :port => 123 do
  # code to change ssh user and port here
end