Sha256: 829afaaa0b4897431c21d4aacea0ebe09b843ec825a218faf99378cc7b2ddede

Contents?: true

Size: 953 Bytes

Versions: 7

Compression:

Stored size: 953 Bytes

Contents

require 'chef/provisioning/convergence_strategy'
require 'pathname'
require 'cheffish'

class Chef
module Provisioning
  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
        Chef::Provisioning.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
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
chef-provisioning-0.18 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.17 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.16 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.15.3 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.15.2 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.15.1 lib/chef/provisioning/convergence_strategy/no_converge.rb
chef-provisioning-0.15 lib/chef/provisioning/convergence_strategy/no_converge.rb