Puppet Version: 3.0 - 6.14 Puppet Server Version: 3.0 - 6.9.2 OS Name/Version: RHEL+CentOS 7 and 8 Puppet package fails to install or update java-1.8.0-openjdk-headless. This has been consistent for 2 generations of RH linux kernels and 4 generations of Puppet To reproduce:
- Install a fresh build of RHEL or CentOS (reproducable on all modern versions, I tested on CentOS 8.1.1 and replicated on RHEL and CentOS 7.5 and 7.7(
- Install Puppet (tested on puppetmaster 6.9.2-1, reproduced as far back as 3.1)
- Try and install openjdk - headless
matt@vm041:72% sudo puppet resource package java-1.8.0-openjdk-headless ensure=present package { 'java-1.8.0-openjdk-headless': ensure => '1:1.8.0.242.b08-0.el8_1', provider => 'dnf', } matt@vm041:73% Notice that the ensure value returns a version, not a Boolean. When I try installing the package from a manifest I get the following error: package { ' java-1.8.0-openjdk-headless': ensure => true, } matt@vm041: 73% sudo puppet agent --test ... Info: Applying configuration version '1586032186' Error: undefined method `index' for true:TrueClass Info: Unknown failure using insync_values? on type: Package[java-1.8.0-openjdk-headless] / property: ensure to compare values [true] and 1:1.8.0.242.b08-0.el8_1 Error: /Stage[main]/Linux/Package[java-1.8.0-openjdk-headless]/ensure: change from '1:1.8.0.242.b08-0.el8_1' to true failed: undefined method `index' for true:TrueClass Info: Stage[main]: Unscheduling all events on Stage[main] Notice: Applied catalog in 10.02 seconds matt@vm041:74% Installing the non-headless version works as expected. Installing the package through dnf or yum works as expected Desired Behavior:
puppet package returns a boolean value, run exits with success Actual Behavior: puppet package returns a string value and fails the run |