Sha256: 1dc2a68e1428d0e871e23beea2c9ab7acb0cc6a189d609a02dbc8c795d051889

Contents?: true

Size: 919 Bytes

Versions: 13

Compression:

Stored size: 919 Bytes

Contents

require 'chef_metal/convergence_strategy'
require 'pathname'
require 'cheffish'

module ChefMetal
  class ConvergenceStrategy
    class NoConverge < ConvergenceStrategy
      def initialize(convergence_options, config)
        super
      end

      def chef_server
        @chef_server ||= convergence_options[:chef_server] || Cheffish.default_chef_server(config)
      end

      def setup_convergence(action_handler, machine)
      end

      def converge(action_handler, machine)
      end

      def cleanup_convergence(action_handler, machine_spec)
        _self = self
        ChefMetal.inline_resource(action_handler) do
          chef_node machine_spec.name do
            chef_server _self.chef_server
            action :delete
          end
          chef_client machine_spec.name do
            chef_server _self.chef_server
            action :delete
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
clc-fork-chef-metal-0.14.alpha.10 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.9 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.8 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.7 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.6 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.5 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.4 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.3 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.2 lib/chef_metal/convergence_strategy/no_converge.rb
chef-metal-0.14.2 lib/chef_metal/convergence_strategy/no_converge.rb
clc-fork-chef-metal-0.14.alpha.1 lib/chef_metal/convergence_strategy/no_converge.rb
chef-metal-0.14.1 lib/chef_metal/convergence_strategy/no_converge.rb
chef-metal-0.14 lib/chef_metal/convergence_strategy/no_converge.rb