Skip to content

Commit

Permalink
fix provider
Browse files Browse the repository at this point in the history
- add templatefile definition
- reformat code
  • Loading branch information
rwaffen committed Sep 3, 2015
1 parent 64fd4dc commit b0d642a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/puppet/provider/onetemplate/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def create
end if resource[:context]
end
end
tempfile = builder.to_xml
file.write(tempfile)
file.close
self.debug "Creating template using #{tempfile}"
Expand Down Expand Up @@ -114,9 +115,8 @@ def self.instances
def self.prefetch(resources)
templates = instances
resources.keys.each do |name|
if provider = templates.find{ |template| template.name == name }
resources[name].provider = provider
end
provider = templates.find { |template| template.name == name }
resources[name].provider = provider unless provider.nil?
end
end

Expand Down

0 comments on commit b0d642a

Please sign in to comment.