Am Sonntag, dem 18.12.2022 um 05:10 -0800 schrieb Nir Fishler:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/custom_facts/core/execution/
This is the wrong place. Ruby based facts should be put into "lib/facter/"
inside a module, see https://puppet.com/docs/puppet/7/custom_facts.html.
@Martin,
I have tried your approach; I put the facter file underneath:
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/facter/custom_facts/core/execution/
*file:*
username.rb
*content:*
*# username.rb*
*Facter.add(:username) do*
* setcode do*
*
Thanks a lot guys for your prompt reply!
Gonna try it out later on.
On Monday, December 5, 2022 at 9:47:52 AM UTC+2 dhei...@opentext.com wrote:
> Am Sonntag, dem 04.12.2022 um 07:43 -0800 schrieb Nir Fishler:
>
> Main goal: get a list of upgrade-able packages and notify the user about
> it.
>
Am Sonntag, dem 04.12.2022 um 07:43 -0800 schrieb Nir Fishler:
Main goal: get a list of upgrade-able packages and notify the user about it.
The puppetlabs-apt module from the Puppet Forge has various facts for this.
HTH...
Dirk
--
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
Hi Nir,
You want to collect information on nodes and you want to use this information
in a catalog.
This is what facter is used for.
/lib/facter/upgradable_packages.rb
Facter.add(:upgradable_packages) do
setcode do
Facter::Core::Execution.execute("/usr/bin/apt --simulate upgrade | grep
Hello,
I'd like to store an output of a bash command into a variable, and then
print it to stdout using notify in Puppet.
Main goal: get a list of upgrade-able packages and notify the user about it.
I have tried the below but it doesn't seem to work:
$pkgs_list = $("/usr/bin/apt --simulate