voxpupuli / puppet-augeas

Helper for using augeas with puppet
Apache License 2.0
44 stars 82 forks source link

Debian 12 support #95

Open virus2500 opened 11 months ago

virus2500 commented 11 months ago

Hi,

since it seems like there won't be an puppet agent for Debian 12 directly from puppet, or at least any time soon, i installed the puppet agent from Debian 12 repos. Now the problem is that the Debian 12 Agent has an different directory layout [1]

There is no /opt/puppetlabs folder at all.

Now when i run the puppet agent and an module ( in this case puppet-postfix) useas augeas::lenses i get the following errors:

Warning: Augeas[Postfix canonical - @deg-debian12.lab.magenta.at](provider=augeas): Loading failed for one or more files, see debug for /augeas//error output
Error: /Stage[main]/Atsso_basic::Mail::Setup/Postfix::Canonical[@deg-debian12.lab.magenta.at]/Augeas[Postfix canonical - @deg-debian12.lab.magenta.at]: Could not evaluate: Save failed, see debug output for details
Notice: /Stage[main]/Atsso_basic::Mail::Setup/Postfix::Hash[/etc/postfix/canonical]/Postfix::Map[/etc/postfix/canonical]/Exec[generate /etc/postfix/canonical.db]: Dependency Augeas[Postfix canonical - @deg-debian12.lab.magenta.at] has failures: true
Warning: /Stage[main]/Atsso_basic::Mail::Setup/Postfix::Hash[/etc/postfix/canonical]/Postfix::Map[/etc/postfix/canonical]/Exec[generate /etc/postfix/canonical.db]: Skipping because of failed dependencies
Error: Cannot create /opt/puppetlabs/puppet/share/augeas/lenses; parent directory /opt/puppetlabs/puppet/share/augeas does not exist
Error: /Stage[main]/Augeas::Files/File[/opt/puppetlabs/puppet/share/augeas/lenses]/ensure: change from 'absent' to 'directory' failed: Cannot create /opt/puppetlabs/puppet/share/augeas/lenses; parent directory /opt/puppetlabs/puppet/share/augeas does not exist (corrective)
Notice: /Stage[main]/Augeas::Files/File[/opt/puppetlabs/puppet/share/augeas/lenses/dist]: Dependency File[/opt/puppetlabs/puppet/share/augeas/lenses] has failures: true
Warning: /Stage[main]/Augeas::Files/File[/opt/puppetlabs/puppet/share/augeas/lenses/dist]: Skipping because of failed dependencies
Warning: /Stage[main]/Augeas::Files/File[/opt/puppetlabs/puppet/share/augeas/lenses/tests]: Skipping because of failed dependencies
Warning: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/opt/puppetlabs/puppet/share/augeas/lenses/postfix_canonical.aug]: Skipping because of failed dependencies
Warning: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Typecheck lens postfix_canonical]: Skipping because of failed dependencies
Warning: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/File[/opt/puppetlabs/puppet/share/augeas/lenses/tests/test_postfix_canonical.aug]: Skipping because of failed dependencies
Warning: /Stage[main]/Postfix::Augeas/Augeas::Lens[postfix_canonical]/Exec[Test lens postfix_canonical]: Skipping because of failed dependencies

Manually creating the directory /opt/puppetlabs/puppet/share/augeas does work but of course this is only an "dirty" workaround.

It seems for the debian 12 agent /usr/share/puppet would be the right folder

root@deg-debian12:/opt$ ls /usr/share/puppet/
locale  modules  vendor_modules

Now i think the only option to fix this would be via hiera or is there maybe another way? I tried to find a variable or whatever that could be used instead of the static directory path but couldn't find any.

Even an puppet config print only shows module paths but not the basepath...

root@deg-debian12:~$ puppet config print | grep share
basemodulepath = /etc/puppet/code/modules:/usr/share/puppet/modules
modulepath = /usr/share/puppet/modules
vendormoduledir = /usr/share/puppet/vendor_modules

Thanks and br Mike

stale[bot] commented 7 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.