Skip to content

Instantly share code, notes, and snippets.

@combusean
Created April 10, 2014 04:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save combusean/10341727 to your computer and use it in GitHub Desktop.
Save combusean/10341727 to your computer and use it in GitHub Desktop.
refactor example
- salt_cmd = "salt -L '#{key}' cmd.retcode 'export HOME=#{@home}; #{cmd} >> #{@local_log}'"
- unless redirect
- salt_cmd = "salt '#{key}' cmd.run '#{cmd}'"
- end
+ salt_cmd = redirect ? "salt -L '#{key}' cmd.retcode 'export HOME=#{@home}; #{cmd} >> #{@local_log}'" : "salt '#{key}' cmd.run '#{cmd}'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment