jhoblitt
05/19/2022, 5:58 PMjosh
05/19/2022, 5:58 PMAlex Fisher
05/19/2022, 6:01 PMPuppet::Property::Bool as a working replacement to Puppet::Property::Boolean ?Alex Fisher
05/19/2022, 6:02 PMAlex Fisher
05/19/2022, 6:02 PMjhoblitt
05/19/2022, 6:04 PMNotice: /Stage[main]/Profile::Core::Puppet_master/Foreman_global_parameter[this-is-a-test]/value: value changed false to 'false' (corrective)josh
05/19/2022, 6:08 PMPuppet::Property::Booleanjhoblitt
05/19/2022, 6:08 PMjhoblitt
05/19/2022, 6:08 PMAlex Fisher
05/19/2022, 6:08 PMAlex Fisher
05/19/2022, 6:09 PMjhoblitt
05/19/2022, 6:10 PM(@should - [true,:true]).empty? is blowing my mindjhoblitt
05/19/2022, 6:12 PM(@should - [true,:true]).empty? is blowing my mindjosh
05/19/2022, 6:14 PMjosh
05/19/2022, 6:15 PMforce => true )jhoblitt
05/19/2022, 6:51 PMrequire 'puppet/property/boolean'
module PuppetX
module Foreman
module Property
class Foolean < Puppet::Property::Boolean
def should
return nil unless defined?(@should)
(@should - [true,:true]).empty?
end
def insync?(is)
is == should
end
end
end
end
end
and
newproperty(:value, boolean: true, parent: PuppetX::Foreman::Property::Foolean) do
desc 'Parameter value'
endjhoblitt
05/19/2022, 7:00 PMjhoblitt
05/19/2022, 7:05 PMgenebean
05/19/2022, 8:12 PMVoxBot
05/19/2022, 8:24 PMVoxBot
05/19/2022, 8:24 PMVoxBot
05/19/2022, 8:25 PMAlex Fisher
05/19/2022, 8:34 PMgenebean
05/19/2022, 8:36 PMgenebean
05/19/2022, 8:40 PMjhoblitt
05/19/2022, 10:07 PMSlackbot
05/19/2022, 11:51 PMVoxBot
05/20/2022, 6:55 AMVoxBot
05/20/2022, 7:16 AMVoxBot
05/20/2022, 9:42 AM