Closed PerHenriksson closed 2 years ago
Hej @PerHenriksson,
@anders-larsson and I have discussed your issue. We came to the conclusion that it is need to add the possibility to specify names and paths explicitly to fix your issue. This way we can keep backward compatibility working.
I have created a branch in my fork that will allow you to specify the map path explicity to fix the automatic prefixing of auto.
. By doing so you will be able to override previous declared mounts with maps_hiera_merge
.
Add mappath to your given example to fix your issue:
autofs::maps:
'auto.proj':
mountpoint: 'proj'
mappath: '/etc/auto.proj'
file: '/path/to/file/with/mounts'
You can find my feature branch here: https://github.com/Phil-Friderici/puppet-module-autofs/tree/mapname/path
Hej @PerHenriksson,
could you please test and verify if my feature branch does help to solve your problem ? I would like to get it fixed before I start to work on other tasks with this module.
Thanks
Phil
Fixed in version v1.5.0
When adding a mount using the construction:
it results in following entry in /etc/auto.master:
But if specifying that mounts should be read from a file with:
it will result in the /etc/auto.master entry:
and in the file /etc/auto.auto.proj where I expect the file name to be /etc/auto.proj.
IMHO this is an improper imbalance in the usage of the
key
parameter ofautofs::maps
originating from different usage of thekey
parameter in templates/master.erb on lines 14 and 16.A workaround would be to instead specify
but that disables the ability to override previous declared mounts when using
autofs::maps_hiera_merge: 'true'
.