Class: Resource::Template
Constant Summary collapse
- PREFIX =
''
Instance Method Summary collapse
Methods inherited from Base
inherited, #not_if, #set_base_defaults, #should_skip?, #unix_mode
Methods included from ClassAttr
Methods included from BlockAttr
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/resource/template.rb', line 13 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| b.run "chown #{@owner}:#{@owner} #{@target}" b.run "chmod #{unix_mode} #{@target}" b.always_run @always_run end end |