craigwatson/puppet-vmwaretools — pull request #58 by esalberg (2014-10-29 19:45:31+00:00)
Title: Add prevent_upgrade option

- add prevent_upgrade option (does not deploy files if the Puppet version is higher than the installed version)
- rewrite logic around prevent_downgrade to include prevent_upgrade
- modify the regex for how to download vmwaretools to fix a Lint issue with the previous syntax

I did the following manual functional testing (PE 3.3.2, RHEL 6.5 only, puppet:/// file source):
vmwaretools version increase, both prevents set to true
goal: no upgrade
actual: no upgrade

vmwaretools same version, both prevents set to false
goal: no upgrade
actual: no upgrade

vmwaretools version increase, prevent_upgrade set to true (prevent_downgrade set to true)
goal: no upgrade
actual: no upgrade

vmwaretools version increase, prevent_upgrade set to false (prevent_downgrade set to false)
goal: upgrade (install)
actual: upgrade (install)

vmwaretools version decrease, prevent_downgrade set to true (prevent_upgrade set to false)
goal: no downgrade
actual: no downgrade

vmwaretools version decrease, prevent_downgrade set to false (prevent_upgrade set to true
goal: downgrade
actual: downgrade

no vmwaretools installed, prevent_downgrade and prevent_upgrade set to true
goal: install
actual: install