Sha256: 637d69e51ca3fe41bcd1d25137834ae8ffc2d8cb0f15f397915337a504ebabbe

Contents?: true

Size: 552 Bytes

Versions: 59

Compression:

Stored size: 552 Bytes

Contents

# Store a specified file in our filebucket.
Puppet::Face.define(:file, '0.0.1') do
  action :store do |*args|
    summary "Store a file in the local filebucket."
    arguments "<file>"
    returns "Nothing."
    examples <<-EOT
      Store a file:

      $ puppet file store /root/.bashrc
    EOT

    when_invoked do |path, options|
      file = Puppet::FileBucket::File.new(IO.binread(path))

      Puppet::FileBucket::File.indirection.terminus_class = :file
      Puppet::FileBucket::File.indirection.save file
      file.checksum
    end
  end
end

Version data entries

59 entries across 59 versions & 3 rubygems

Version Path
puppet-parse-0.1.4 lib/vendor/puppet/face/file/store.rb
puppet-parse-0.1.3 lib/vendor/puppet/face/file/store.rb
puppet-parse-0.1.2 lib/vendor/puppet/face/file/store.rb
puppet-parse-0.1.1 lib/vendor/puppet/face/file/store.rb
puppet-2.7.26 lib/puppet/face/file/store.rb
puppet-2.7.25 lib/puppet/face/file/store.rb
puppet-2.7.24 lib/puppet/face/file/store.rb
puppet-3.3.2 lib/puppet/face/file/store.rb
puppet-3.3.1 lib/puppet/face/file/store.rb
puppet-3.3.1.rc3 lib/puppet/face/file/store.rb
puppet-3.3.1.rc2 lib/puppet/face/file/store.rb
puppet-3.3.1.rc1 lib/puppet/face/file/store.rb
puppet-3.3.0 lib/puppet/face/file/store.rb
puppet-3.3.0.rc3 lib/puppet/face/file/store.rb
puppet-3.3.0.rc2 lib/puppet/face/file/store.rb
puppet-3.2.4 lib/puppet/face/file/store.rb
puppet-2.7.23 lib/puppet/face/file/store.rb
puppet-3.2.3 lib/puppet/face/file/store.rb
puppet-3.2.3.rc1 lib/puppet/face/file/store.rb
puppet-3.2.2 lib/puppet/face/file/store.rb