Sha256: d319bdce2abac9f671c98e9ddbdace279abfa2ab6ff37b44b43e9bb169690c85

Contents?: true

Size: 1015 Bytes

Versions: 10

Compression:

Stored size: 1015 Bytes

Contents

require 'chef/provisioning/fog_driver/driver'
require 'chef/resource/fog_key_pair'
require 'chef/provider/fog_key_pair'

class Chef
  module DSL
    module Recipe
      def with_fog_driver(provider, driver_options = nil, &block)
        config = Cheffish::MergedConfig.new({ :driver_options => driver_options }, run_context.config)
        driver = Driver.from_provider(provider, config)
        run_context.chef_provisioning.with_driver(driver, &block)
      end

      def with_fog_ec2_driver(driver_options = nil, &block)
        with_fog_driver('AWS', driver_options, &block)
      end

      def with_fog_openstack_driver(driver_options = nil, &block)
        with_fog_driver('OpenStack', driver_options, &block)
      end

      def with_fog_rackspace_driver(driver_options = nil, &block)
        with_fog_driver('Rackspace', driver_options, &block)
      end

      def with_fog_vcair_driver(driver_options = nil, &block)
        with_fog_driver('Vcair', driver_options, &block)
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
chef-provisioning-fog-0.20.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.19.1 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.19.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.18.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.17.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.16.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.15.3 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.15.2 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.15.1 lib/chef/provisioning/fog_driver/recipe_dsl.rb
chef-provisioning-fog-0.14.0 lib/chef/provisioning/fog_driver/recipe_dsl.rb