voxpupuli / puppet-autofs

Puppet Module for autofs https://forge.puppet.com/puppet/autofs
Apache License 2.0
7 stars 32 forks source link

Allow to add +auto.master in auto.master file #183

Closed erobhal closed 2 years ago

erobhal commented 2 years ago

Pull Request (PR) description

Allows inclusion of +auto.master in /etc/auto.master by adding this to the 'mapfiles' property:

"/etc/auto.master":
    mappings:
    - key: "+"
      fs: "auto.master"

This Pull Request (PR) fixes the following issues

kenyon commented 2 years ago

It looks like the only reason you can't do this with the current implementation is that you can't have whitespace between the + and the map name. Is that right?

erobhal commented 2 years ago

That is correct

bastelfreak commented 2 years ago

@erobhal thanks for the PR. can you maybe add a unit test for the change to verify the created file? Do you think this is a breaking change?

erobhal commented 2 years ago

@bastelfreak Been a while since I coded puppet modules and I have never used puppet acceptance tests, so not sure how to do that. The change should not affect mappings not using a plus sign as key so I can't see that it would break anything.

erobhal commented 2 years ago

@bastelfreak Have included acceptance test now. I hope I figured it out. Looks ok in the testlogs as far as I can tell.

bastelfreak commented 2 years ago

thanks for the work!