diff options
author | Tim Smith <tsmith@chef.io> | 2016-11-08 15:20:34 -0800 |
---|---|---|
committer | Tim Smith <tsmith@chef.io> | 2017-05-12 09:29:33 -0700 |
commit | d018ca2d667c91b4552bfc271193ceb3b0737167 (patch) | |
tree | 08633b1dab40a3788c4b410f821fa952e7870e00 /lib/chef/resource/apt_preference.rb | |
parent | 82edefc9c48683df91b158ffc84ad54eebfbe9ce (diff) | |
download | chef-d018ca2d667c91b4552bfc271193ceb3b0737167.tar.gz |
Initial apt_preference commit
Specs are a placeholder on the provider side
Signed-off-by: Tim Smith <tsmith@chef.io>
Diffstat (limited to 'lib/chef/resource/apt_preference.rb')
-rw-r--r-- | lib/chef/resource/apt_preference.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/chef/resource/apt_preference.rb b/lib/chef/resource/apt_preference.rb new file mode 100644 index 0000000000..913f7382ce --- /dev/null +++ b/lib/chef/resource/apt_preference.rb @@ -0,0 +1,36 @@ +# +# Author:: Tim Smith (<tsmith@chef.io>) +# Copyright:: Copyright (c) 2016 Chef Software, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require "chef/resource" + +class Chef + class Resource + class AptPreference < Chef::Resource + resource_name :apt_repository + provides :apt_preference + + property :package_name, String, name_property: true, regex: [/^([a-z]|[A-Z]|[0-9]|_|-|\.|\*|\+)+$/] + property :glob, String + property :pin, String + property :pin_priority, String + + default_action :add + allowed_actions :add, :remove + end + end +end |