diff --git a/lib/facter/extlib__puppet_config.rb b/lib/facter/extlib__puppet_config.rb index b5e0573..b1c5ce0 100644 --- a/lib/facter/extlib__puppet_config.rb +++ b/lib/facter/extlib__puppet_config.rb @@ -17,7 +17,9 @@ ssldir vardir server - ] + environment + ], + agent: %i[environment], } desired_settings.each_pair do |section, settings| diff --git a/spec/unit/facter/extlib__puppet_config_spec.rb b/spec/unit/facter/extlib__puppet_config_spec.rb index a5e055d..bc9a7f4 100644 --- a/spec/unit/facter/extlib__puppet_config_spec.rb +++ b/spec/unit/facter/extlib__puppet_config_spec.rb @@ -14,11 +14,15 @@ 'localcacert' => '/dev/null/ssl/certs/ca.pem', 'server' => 'puppet', 'ssldir' => '/dev/null/ssl', - 'vardir' => '/dev/null' + 'vardir' => '/dev/null', + 'environment' => 'production' }, 'master' => { 'localcacert' => '/dev/null/ssl/certs/ca.pem', 'ssldir' => '/dev/null/ssl' + }, + 'agent' => { + 'environment' => 'production' } } end