Class: Puppet::Provider::Mountpoint

Inherits:
Puppet::Provider
  • Object
show all
Defined in:
lib/puppet/provider/mountpoint.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
# File 'lib/puppet/provider/mountpoint.rb', line 6

def create
  mount_with_options(resource[:device], resource[:name])
end

#destroyObject



10
11
12
# File 'lib/puppet/provider/mountpoint.rb', line 10

def destroy
  unmount(resource[:name])
end

#deviceObject



14
15
16
# File 'lib/puppet/provider/mountpoint.rb', line 14

def device
  entry[:device]
end

#device=(value) ⇒ Object



18
19
20
21
# File 'lib/puppet/provider/mountpoint.rb', line 18

def device=(value)
  unmount(resource[:name])
  mount_with_options(resource[:device], resource[:name])
end

#exists?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/puppet/provider/mountpoint.rb', line 2

def exists?
  ! entry[:name].nil?
end

#handle_notificationObject



23
24
25
# File 'lib/puppet/provider/mountpoint.rb', line 23

def handle_notification
  remount if resource[:ensure] == :present and exists?
end