Skip to content

Instantly share code, notes, and snippets.

@larryebaum
Created November 10, 2016 20:08
Show Gist options
  • Save larryebaum/fe155abb36946fd1e17720b0939f2b3f to your computer and use it in GitHub Desktop.
Save larryebaum/fe155abb36946fd1e17720b0939f2b3f to your computer and use it in GitHub Desktop.
#WINDOWS Knife Example Content
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name "chef_user_here"
client_key "#{ENV['HOME']}/.chef/chef_client_here.pem"
validation_client_name "organization_here-validator"
validation_key "#{ENV['HOME']}/.chef/organization_here-validator.pem"
chef_server_url "https://api.opscode.com/organizations/organization_here"
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path [ "#{ENV['HOME']}/path/to/your/cookbooks",
"#{ENV['HOME']}/other/path/to/your/cookbooks"
]
# Optional; pass your key files for using a cloud provider
# knife[:digital_ocean_client_id] = ''
# knife[:digital_ocean_api_key] = ''
# Optional; pass environment variables, thus no need to code values; only need to update in single location (env value)
# knife[:aws_credential_file] = '~/.aws/config'
# knife[:aws_credential_file] = ENV['AWS_CONFIG_FILE']
# knife[:region] = 'us-east-1'
# Uncomment below block behind proxy
#=begin
# proxy server settings
# no_proxy ENV['NO_PROXY']
# http_proxy ENV['HTTP_PROXY']
# http_proxy_user ENV['USERNAME']
# http_proxy_pass ENV['PASSWORD']
# https_proxy ENV['HTTPS_PROXY']
# https_proxy_user ENV['USERNAME']
# https_proxy_pass ENV['PASSWORD']
# knife upload requires rest client proxy. Ignores above settings.
# install rest-client gem: gem install rest-client
# http://rubydoc.info/github/rest-client/rest-client
# require 'rest-client'
# RestClient.proxy = ENV['HTTP_PROXY']
#=end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment