diff options
author | Adam Jacob <adam@hjksolutions.com> | 2008-07-28 17:57:49 -0700 |
---|---|---|
committer | Adam Jacob <adam@hjksolutions.com> | 2008-07-28 17:57:49 -0700 |
commit | 8d4c3be22c5dbb030e96bcbac12679de7a09b0fe (patch) | |
tree | 6fd5282dccb98e63ce8fae5277e7cadf8acc204a /lib/chef/resource/template.rb | |
parent | d734c714c1e7598ddba40b47c26d10f002e06420 (diff) | |
download | chef-8d4c3be22c5dbb030e96bcbac12679de7a09b0fe.tar.gz |
Updating search tickets
Diffstat (limited to 'lib/chef/resource/template.rb')
-rw-r--r-- | lib/chef/resource/template.rb | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/lib/chef/resource/template.rb b/lib/chef/resource/template.rb new file mode 100644 index 0000000000..25df8c712d --- /dev/null +++ b/lib/chef/resource/template.rb @@ -0,0 +1,52 @@ +# +# Author:: Adam Jacob (<adam@hjksolutions.com>) +# Copyright:: Copyright (c) 2008 HJK Solutions, LLC +# License:: GNU General Public License version 2 or later +# +# This program and entire repository is free software; you can +# redistribute it and/or modify it under the terms of the GNU +# General Public License as published by the Free Software +# Foundation; either version 2 of the License, or any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + + +class Chef + class Resource + class Template < Chef::Resource::File + + def initialize(name, collection=nil, node=nil) + @resource_name = :template + super(name, collection, node) + @action = "create" + @template = nil + @variables = Hash.new + end + + def template(file=nil) + set_or_return( + :template, + file, + :kind_of => [ String ] + ) + end + + def variables(args=nil) + set_or_return( + :vars, + args, + :kind_of => [ Hash ] + ) + end + + end + end +end
\ No newline at end of file |