Basic Info Module Version: puppetlabs-stdlib (v6.0.0) Puppet Version: PE 2018, (5.5.14) OS Name/Version: RHEL 7 agent Replication... Install the inifile module (puppetlabs-inifile (v3.1.0)) on a Master and use the following test code to apply a file to my test agent:
class ensurerestest{ |
|
ensure_resources ('ini_setting', {'sample' => {'ensure' => 'present', 'path' => '/tmp/foo.ini', 'section' => 'bar', 'setting' => 'baz', 'value' => 'quux'}}) |
|
}
|
Next, I run the code on my agent and it applies the file just fine:
[root@kpnk72tadahzkhg ~]# puppet agent -t |
Info: Using configured environment 'production' |
Info: Retrieving pluginfacts |
Info: Retrieving plugin |
Info: Retrieving locales |
Info: Loading facts |
Info: Caching catalog for kpnk72tadahzkhg.delivery.puppetlabs.net |
Info: Applying configuration version '1566905395' |
Notice: /Stage[main]/Ensurerestest/Ini_setting[sample]/ensure: created |
Notice: Applied catalog in 0.05 seconds
|
Next, uninstall the inifile module from your Master, and remove the /tmp/foo.ini file from the agent. Do a puppet run and nothing happens. The file doesn't get recreated and it throws no error regarding the missing inifile resource type:
[root@kpnk72tadahzkhg ~]# puppet agent -t |
Info: Using configured environment 'production' |
Info: Retrieving pluginfacts |
Info: Retrieving plugin |
Info: Retrieving locales |
Info: Loading facts |
Info: Caching catalog for kpnk72tadahzkhg.delivery.puppetlabs.net |
Info: Applying configuration version '1566907718' |
Notice: Applied catalog in 0.05 seconds
|
Desired Behavior: Agent tries to create the resource and an error should be thrown when the infile provider isn't found, something like the classic Evaluation Error: "Error while evaluating a Function Call, Unknown resource type: 'ini_setting'" Actual Behavior: The agent just runs, the resource doesn't get created and no error is thrown about the missing resource type |