-
Type:
New Feature
-
Status: Resolved
-
Priority:
Normal
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Types and Providers
-
Labels:
-
Template:customfield_10700 368740
-
Team:Night's Watch
-
Sprint:NW - 2020-08-18, NW - 2020-09-01, NW - 2020-09-16, NW - 2020-09-30
-
Zendesk Ticket IDs:40361
-
Zendesk Ticket Count:1
-
QA Risk Assessment:Needs Assessment
Customer has asked me to create a feature request to allow them to check if a package is installed before puppet enforces the configured version.
For example, customer would like to be able to do something like this:
$packages =
{ 'puppet' => \{ ensure => '6.14.0-1.el7' },
'ntp' => { ensure => '1.5.3-1' },
}
keys($pkg_hash).each |Integer $index, String $pkg| {
if ! $facts['_puppet_inventory_1']['packages'][$pkg]['1']
elsif versioncmp($facts['_puppet_inventory_1']['packages'][$pkg]['1'], ${attributes['ensure']}) == "1"
{ $upgrade=False }elsif versioncmp($facts['_puppet_inventory_1']['packages'][$pkg]['1'], ${attributes['ensure']}) == "-1"
{ $upgrade=True }if ($upgrade == undef) or ($upgrade) {
package
}
}