Oleksandr Lytvyn
11/26/2025, 10:45 AMif dig($facts, 'virtual') == 'vmware' and $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' {
if Deferred('file', ['/etc/yum.repos.d/microsoft-prod.repo']).exist? {
file_line { 'microsoft_repo_gpgcheck':
ensure => present,
path => '/etc/yum.repos.d/microsoft-prod.repo',
line => 'gpgcheck=1',
match => '^\s*gpgcheck\s*=.*$',
}
}
}
Basically what makes me somewhat upset is case when in future this file will no longer be there, and from what i remember if file is absent but file_line resource will look for it it will pretty much make "puppet agent -t" fail with ERROR 500 because catalog won't be compiled.
I started asking Microsoft Copilot and it gave me code above using "Deffered" to check if file exists on filesystem and only then try to apply "file_line".
But Google Gemini says that it will not work and that is not how Deffered is used and pushing me towards using module from Forge with "deffered" in its name.
Could someone advice, would code above work? Or what you advice in general for my use case?bastelfreak
11/26/2025, 10:50 AMOleksandr Lytvyn
11/26/2025, 10:52 AMbastelfreak
11/26/2025, 1:59 PMNeeloj
12/01/2025, 10:23 AMpuppet config print --section master autosign
/usr/local/bin/autosign-psk
how can I verify why its nor working ? In logs puppetserver.log I dont see any errors about that.bastelfreak
12/01/2025, 10:24 AMbastelfreak
12/01/2025, 10:25 AMbastelfreak
12/01/2025, 10:25 AMgovind
12/03/2025, 6:25 AMgovind
12/03/2025, 6:26 AMgovind
12/03/2025, 6:27 AMgovind
12/03/2025, 6:35 AMtuxmea
12/03/2025, 7:04 AMgovind
12/03/2025, 7:28 AMbastelfreak
12/03/2025, 7:28 AMgovind
12/03/2025, 7:29 AMbastelfreak
12/03/2025, 7:29 AMgovind
12/03/2025, 7:30 AMgovind
12/03/2025, 7:31 AMgovind
12/03/2025, 7:32 AMgovind
12/03/2025, 7:35 AMbastelfreak
12/03/2025, 7:49 AMpuppet resource --types only gives you a list of all types that Puppet can managebastelfreak
12/03/2025, 7:49 AMgovind
12/03/2025, 8:01 AMbastelfreak
12/03/2025, 8:02 AMbastelfreak
12/03/2025, 1:16 PMjms1
12/03/2025, 3:26 PMresources[] list within the catalog in the exact order that the agent will check/enforce the resources? or does the agent go through what it receives, resolve the dependences, and convert it from an "un-ordered list" to an "ordered list"? ... i've always assumed it was the latter (i.e. agent resolves dependencies) but i'm being asked for a definitive answer now.vchepkov
12/09/2025, 4:54 PMYorokobi
12/09/2025, 7:37 PMjms1
12/09/2025, 9:47 PMpuppet agent -t --debug, and it turns out the problem is one file resource with ensure => directory and recurse => true, where that directory tree on the target server contains about 450K individual files (this is an expected condition, but it's something that our QA people aren't testing) ... the debug logs show that the agent is looking up the expected SELinux (user, role, type, range) for EVERY SINGLE FILE, apparently so it can check/fix every single file