def render (from, to, as: user, on: hosts, quiet: false, once: nil)
      self.once once, quiet: quiet do
        Dir.chdir File.dirname(file) do
          (Dir["#{from}**/*.erb"] + Dir["#{from}**/.*.erb"]).each do |path|
            template = ERB.new(File.read(path))
            to_path = to + path[from.length..-5]
            log.info "render: #{path} -> #{to_path}", quiet: quiet do
              hash_map(hosts) do |host|
                host.cp StringIO.new(template.result(binding)), to_path, as: as, quiet: quiet
              end
            end
          end
        end
      end
    end
def render (from, to, as: user, on: hosts, quiet: false, once: nil)
      self.once once, quiet: quiet do
        Dir.chdir File.dirname(file) do
          (Dir["#{from}**/*.erb"] + Dir["#{from}**/.*.erb"]).each do |path|
            template = ERB.new(File.read(path))
            to_path = to + path[from.length..-5]
            log.info "render: #{path} -> #{to_path}", quiet: quiet do
              hash_map(hosts) do |host|
                host.cp StringIO.new(template.result(binding)), to_path, as: as, quiet: quiet
              end
            end
          end
        end
      end
    end
Renders and installs files from ERB templates. Files are under +from+ in ERB format. +from/foo/bar.conf.erb+ is
 rendered and written to +to/foo/bar.conf+. Non-ERB files are ignored.
 @param [String] from The directory to search for .erb files.
 @param [String] to The remote directory to put files in.
 @macro onable
 @macro asable
 @macro quietable
 @macro onceable