# frozen_string_literal: true # Note this file includes very few 'requires' because it expects to be used from the CLI. require 'optparse' module Bolt class BoltOptionParser < OptionParser def self.examples(cmd, desc) <<-EXAMP #{desc} a Windows host via WinRM, providing for the password bolt #{cmd} -n winrm://winhost -u Administrator -p #{desc} the local machine, a Linux host via SSH, and hosts from a group specified in an inventory file bolt #{cmd} -n localhost,nixhost,node_group #{desc} Windows hosts queried from PuppetDB via WinRM as a domain user, prompting for the password bolt #{cmd} -q 'inventory[certname] { facts.os.family = "windows" }' --transport winrm -u 'domain\\Administrator' -p EXAMP end BANNER = <<-HELP Usage: bolt [options] Available subcommands: bolt command run Run a command remotely bolt file upload Upload a local file bolt script run