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*
*
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
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