lib/resource/template.rb in atesta-0.0.2 vs lib/resource/template.rb in atesta-0.0.3
- old
+ new
@@ -9,10 +9,14 @@
block_attr :owner, :group, :mode, :source, :action, :variables, :backup, :target
PREFIX = ''
def run
+ Execution.block 'Ensure template base', @target, @owner do |b|
+ ensure_target_zone
+ b.always_run @always_run
+ end
Execution.block 'Compiling template file', @target, @owner do |b|
compile!
b.always_run @always_run
end
Execution.block 'Ensuring file permissions', @target, 'root' do |b|
@@ -25,10 +29,10 @@
protected
def initialize target, &block
set_base_defaults
@target = target
- ensure_target_zone
+ # ensure_target_zone
self.instance_eval(&block)
end
def target_path
"#{PREFIX}#{@target}"