Skip to content

Instantly share code, notes, and snippets.

@adamenger
Last active July 7, 2020 17:34
Show Gist options
  • Select an option

  • Save adamenger/e60a0a2f0334f05f72be to your computer and use it in GitHub Desktop.

Select an option

Save adamenger/e60a0a2f0334f05f72be to your computer and use it in GitHub Desktop.

Revisions

  1. adamenger revised this gist Nov 9, 2014. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion knife.rb
    Original file line number Diff line number Diff line change
    @@ -7,7 +7,7 @@
    client_key "#{knife[:chef_repo_path]}/#{ENV['USER']}.pem"
    validation_client_name "chef-validator"
    validation_key "#{knife[:chef_repo_path]}/chef-validator.pem"
    chef_server_url "https://chef.example.com"
    chef_server_url "https://chef.example.com/organizations/#{ENV['ORGNAME']}"
    cache_type 'BasicFile'
    cache_options( :path => "#{knife[:chef_repo_path]}/checksums" )
    cookbook_path ["~/example.com/cookbooks"]
  2. adamenger created this gist Oct 30, 2014.
    22 changes: 22 additions & 0 deletions knife.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    knife[:chef_repo_path] = "#{ENV['HOME']}/.chef"

    current_dir = File.dirname(__FILE__)
    log_level :info
    log_location STDOUT
    node_name ENV['USER']
    client_key "#{knife[:chef_repo_path]}/#{ENV['USER']}.pem"
    validation_client_name "chef-validator"
    validation_key "#{knife[:chef_repo_path]}/chef-validator.pem"
    chef_server_url "https://chef.example.com"
    cache_type 'BasicFile'
    cache_options( :path => "#{knife[:chef_repo_path]}/checksums" )
    cookbook_path ["~/example.com/cookbooks"]

    # path to environment files
    environment_path "#{knife[:chef_repo_path]}/environments"

    # Path to encrypted data bag and secret file
    knife[:secret_file] = "/etc/chef/encrypted_data_bag_secret"

    knife[:aws_access_key_id] = ENV['AWS_ACCESS_KEY_ID']
    knife[:aws_secret_access_key] = ENV['AWS_SECRET_ACCESS_KEY']