acceptance/lib/acceptance/ace_command_helper.rb
# A helper to build a bolt command used in acceptance testing
# @param [Beaker::Host] host the host to execute the command on
# @param [String] command the command to execute on the bolt SUT
# @param [Hash] flags the command flags to append to the command
# @option flags [String] '--nodes' the nodes to run on
# @option flags [String] '--user' the user to run the command as
# @option flags [String] '--password' the password for the user
# @option flags [nil] '--no-host-key-check' specify nil to use
# @option flags [nil] '--no-ssl' specify nil to use
# @param [Hash] opts the options hash for this method
A helper to build a bolt command used in acceptance testing
A helper to build a bolt command used in acceptance testing
def bolt_command_on(host, command, flags = {}, opts = {})
      bolt_command = command.dup
      flags.each { |k, v| bolt_command << " #{k} #{v}" }
      case host['platform']
      when /windows/
        execute_powershell_script_on(host, bolt_command, opts)
      when /osx/
        env = 'source /etc/profile  ~/.bash_profile ~/.bash_login ~/.profile && env LANG=en_US.UTF-8'
        on(host, env + ' ' + bolt_command)
      else
        on(host, bolt_command, opts)
      end
    end
def bolt_command_on ( host , command , flags = { } , opts = { } ) bolt_command = command . dup flags . each { | k , v | bolt_command << " #{k} #{v}" } case host [ 'platform' ] when / windows / execute_powershell_script_on ( host , bolt_command , opts ) when / osx / env = 'source /etc/profile  ~/.bash_profile ~/.bash_login ~/.profile && env LANG=en_US.UTF-8' on ( host , env + ' ' + bolt_command ) else on ( host , bolt_command , opts ) end end
A helper to build a bolt command used in acceptance testing
A helper to build a bolt command used in acceptance testing
# Ensure Bolt runs with UTF-8 under macOS. Otherwise we get issues with # UTF-8 content in task results.
host
<not_specific>
command
<not_specific>
flags
'--no-ssl' specify nil to use
' -- no - ssl ' specify nil to use
opts
<not_specific>
<not_specific>
opts the options hash for this method
opts the options hash for this method