Re: [Puppet Users] Custom facts in facter

2015-10-22 Thread Hugo Deprez
Hello, this is working. Thank you ! Hugo On 21 October 2015 at 19:06, Peter Bukowinski wrote: > > > On Oct 21, 2015, at 12:56 PM, Hugo Deprez wrote: > > > > Hello, > > > > I created a custom fact with the following procedure : > > > > mkdir -p /etc/puppet/modules/facts/lib/facter > > touch a

Re: [Puppet Users] Custom facts in facter

2015-10-21 Thread Peter Bukowinski
> On Oct 21, 2015, at 12:56 PM, Hugo Deprez wrote: > > Hello, > > I created a custom fact with the following procedure : > > mkdir -p /etc/puppet/modules/facts/lib/facter > touch apache.rb > > Content of apache.rb file : > Facter.add('apache') do > setcode do > apache_package = Facter:

[Puppet Users] Custom facts in facter

2015-10-21 Thread Hugo Deprez
Hello, I created a custom fact with the following procedure : mkdir -p /etc/puppet/modules/facts/lib/facter touch apache.rb Content of apache.rb file : Facter.add('apache') do setcode do apache_package = Facter::Core::Execution.exec('which apache2') # if 'which apache2' exits with an