Skip to content

Feature: #947 add facter.conf management of blocklist, cache#950

Closed
ikonia wants to merge 25 commits intotheforeman:masterfrom
ikonia:manage_facter_conf
Closed

Feature: #947 add facter.conf management of blocklist, cache#950
ikonia wants to merge 25 commits intotheforeman:masterfrom
ikonia:manage_facter_conf

Conversation

@ikonia
Copy link
Copy Markdown

@ikonia ikonia commented Sep 2, 2025

adds the ability to manage facter blocklist and cache list for puppet agent by.
%99.99 of this work is credited to @vchepkov Vadym Chepkov

Comment thread manifests/agent/facter.pp Outdated
Comment thread manifests/agent/facter.pp Outdated


if $::blocklist {
hocon_setting { 'blocklist facts group':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can't we also write json to the facter conf? Then we don't need a dependency to the hocon module.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionality completed - now moving out of hocon

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure if JSON works, but it's worth a try.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the first few tests sort of worked, but added complexity, more work required before discounting

Comment thread manifests/agent/facter.pp Outdated
Comment thread manifests/agent/facter.pp
Optional[Array[String]] $cachelist = undef,
String $cache_ttl = '1 day',
) {
file { '/etc/puppetlabs/facter':
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please introduce the base directory as a parameter to allow for non-AIO builds.

Comment thread manifests/agent/facter.pp

hocon_setting { 'facter.conf':
path => '/etc/puppetlabs/facter/facter.conf',
require => File['/etc/puppetlabs/facter'],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd wish hocon_setting would autorequire this, but didn't check if it really did.

@evgeni
Copy link
Copy Markdown
Member

evgeni commented Mar 12, 2026

merged in #978

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants