Created
September 9, 2014 17:18
-
-
Save tyler-ball/44a8cfdb152281b3e143 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Chef | |
class Knife | |
module DataBagSecretOptions | |
include Mixlib::CLI | |
option :secret, | |
:short => "-s SECRET", | |
:long => "--secret ", | |
:description => "The secret key to use to encrypt data bag item values", | |
:proc => Proc.new { |s| Chef::Config[:knife][:secret] = s } | |
option :secret_file, | |
:long => "--secret-file SECRET_FILE", | |
:description => "A file containing the secret key to use to encrypt data bag item values", | |
:proc => Proc.new { |sf| Chef::Config[:knife][:secret_file] = sf } | |
option :encrypt, | |
:long => "--encrypt", | |
:description => "Only use the secret configured in knife.rb when this is true", | |
:boolean => true, | |
:default => false | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment