Re: [Puppet Users] Create a variable out of a bash command and notify it

2022-12-18 Thread 'Dirk Heinrichs' via Puppet Users
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.

Re: [Puppet Users] Create a variable out of a bash command and notify it

2022-12-18 Thread Nir Fishler
@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* *

Re: [Puppet Users] Puppet filters

2022-12-18 Thread Nir Fishler
Perfect! Thanks Martin. On Sunday, December 18, 2022 at 10:35:59 AM UTC+2 Martin Alfke wrote: > Hi Nir, > > do you only need the capacity from the root file system? > > You can access the data hash directly: > $facts['mountpoints']['/']['capacity'] > > hth, > Martin > > > > On 18. Dec 2022, at

Re: [Puppet Users] Puppet filters

2022-12-18 Thread Martin Alfke
Hi Nir, do you only need the capacity from the root file system? You can access the data hash directly: $facts['mountpoints']['/']['capacity'] hth, Martin > On 18. Dec 2022, at 08:44, Nir Fishler wrote: > > Hey Guys, > > I'm trying to pull data from an array using the 'mountpoints' facter