Skip to content

Commit

Permalink
bolt
Browse files Browse the repository at this point in the history
  • Loading branch information
neillturner committed Nov 22, 2017
1 parent 7125bf4 commit e10469a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gemspec
gem 'kitchen-docker', '~> 2.6.0'
gem 'rake', '~> 10.4.2'
gem 'rspec', '~> 3.3.0'
gem 'rubocop', '~> 0.34'
gem 'rubocop', '~> 0.49'
gem 'simplecov', '~> 0.10'

# group :integration do
Expand Down
25 changes: 7 additions & 18 deletions lib/kitchen/provisioner/puppet_bolt.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
require 'kitchen'

module Kitchen

module Configurable
def platform_name
instance.platform.name
Expand All @@ -36,38 +35,30 @@ module Provisioner
# Puppet Bolt provisioner.
#
class PuppetBolt < Base
# attr_accessor :tmp_dir
attr_accessor :tmp_dir

default_config :bolt_version, nil

default_config :require_bolt_repo, true
default_config :remove_bolt_repo, false

default_config :custom_install_command, nil
default_config :custom_pre_install_command, nil
default_config :custom_pre_bolt_command, nil
default_config :custom_post_bolt_command, nil

default_config :require_bolt_omnibus, false

default_config :bolt_commands, []
default_config :platform, &:platform_name

default_config :http_proxy, nil
default_config :https_proxy, nil
default_config :no_proxy, nil


# for future use

default_config :bolt_cmd, nil # bolt command run <COMMAND>, bolt script run, bolt task run, bolt plan run, bolt file upload
default_config :bolt_nodes, nil # REQUIRED
default_config :bolt_user, nil # BOLT_USER env variable
default_config :bolt_password, nil
default_config :bolt_modulepath, [] # Required for tasks and plans. The path to the module containing the task. Separate multiple paths with a semicolon (;) on Windows or a colon (:) on all other platforms.
default_config :bolt_params,nil
default_config :bolt_tty,false
default_config :bolt_insecure,true
default_config :bolt_params, nil
default_config :bolt_tty, false
default_config :bolt_insecure, true
default_config :bolt_transport, nil

# Install the dependencies for your platform.
Expand Down Expand Up @@ -193,7 +184,7 @@ def install_bolt
end

def init_command
debug("Init Command")
debug('Init Command')
end

def create_sandbox
Expand Down Expand Up @@ -236,10 +227,8 @@ def run_command
protected

def bolt_commands_to_run
bolt_commands_to_run = []
if config[:bolt_commands]
bolt_commands_to_run = config[:bolt_commands].is_a?(Array) ? config[:bolt_commands] : [config[:bolt_commands]]
end
[]
config[:bolt_commands].is_a?(Array) ? config[:bolt_commands] : [config[:bolt_commands]] if config[:bolt_commands]
end

def bolt_platform
Expand Down

0 comments on commit e10469a

Please sign in to comment.