title: How to call a puppet provider method from puppet manifest?
body: <p>I'm using the ibm_installation_manager module from the puppet forge and it is a bit basic because IBM wrote Installation Manager in a time where idempotency was done much.
  ref: <a href="https://forge.puppet.com/puppetlabs/ibm_installation_manager" rel="nofollow noreferrer">https://forge.puppet.com/puppetlabs/ibm_installation_manager</a></p>
  
  <p>As such it does not cater nicely for upgrades - so the module will not detect if an upgrade is needed, stop existing processes, do the upgrade and then start the processes again. It will just detect if an upgrade is needed and try to install the desired version and if that constitutes an upgrade that's great, but it will probably fail due to running instances.</p>
  
  <p>So I need to implement some "stop processes" pre-upgrade functionality.</p>
  
  <p>I need to mention at this point I'm new to ruby and fairly new to puppet.</p>
  
  <p>The provider that the module uses (imcl.rb) has an exists method.
  The ideal way for me to detect if an upgrade is going to happen (and stop the instances if it is) would be for my puppet manifest to be able to somehow call the exists method. Is this possible?</p>
  
  <p>Or how would you approach this problem?
  Something like imcl.exists(ibm_pkg["my_imcl_pkg_resource"])</p>