Class: Puppet::Provider::Vcsrepo

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

Overview

Abstract

Instance Method Summary collapse

Instance Method Details

#check_forceObject

Raises:

  • (Puppet::Error)


9
10
11
12
13
14
15
# File 'lib/puppet/provider/vcsrepo.rb', line 9

def check_force
  return unless path_exists? && !path_empty?
  raise Puppet::Error, 'Path %s exists and is not the desired repository.' % @resource.value(:path) unless @resource.value(:force)

  notice 'Removing %s to replace with desired repository.' % @resource.value(:path)
  destroy
end