Sha256: a133f8c4624640193cc2f5e3c43f4eb189ef8e4cce54ab5211fc42091fadc675

Contents?: true

Size: 830 Bytes

Versions: 9

Compression:

Stored size: 830 Bytes

Contents

module PoolParty    
  class Rsyncmirror
        
    virtual_resource(:rsyncmirror) do
      
      def loaded(opts={})
        execute_on_node do
          @dir = dir || name
          has_exec(opts.merge({:command => "#{cloud.remote_rsync_command} --no-implied-dirs --delete-excluded #{Default.user}@master:#{@dir}/ #{@dir}/".safe_quote, :name => "rsync-#{name}"}))
        end
      end
            
      # Since git is not a native type, we have to say which core resource
      # it is using to be able to require it
      def class_type_name
        "exec"
      end
      
      # Because we are requiring an exec, instead of a built-in package of the git, we have to overload
      # the to_s method and prepend it with the same name as above
      def key
        "rsync-#{name}"
      end
      
    end
    
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
auser-poolparty-1.1.1 lib/poolparty/plugins/rsyncmirror.rb
auser-poolparty-1.1.3 lib/poolparty/plugins/rsyncmirror.rb
auser-poolparty-1.1.4 lib/poolparty/plugins/rsyncmirror.rb
auser-poolparty-1.1.5 lib/poolparty/plugins/rsyncmirror.rb
auser-poolparty-1.1.6 lib/poolparty/plugins/rsyncmirror.rb
auser-poolparty-1.1.7 lib/poolparty/plugins/rsyncmirror.rb
fairchild-poolparty-1.1.3 lib/poolparty/plugins/rsyncmirror.rb
fairchild-poolparty-1.1.4 lib/poolparty/plugins/rsyncmirror.rb
fairchild-poolparty-1.1.5 lib/poolparty/plugins/rsyncmirror.rb