Page MenuHomeSoftware Heritage

profile::mountpoints: only create directories if the mountpoint is enabled
ClosedPublic

Authored by olasd on Nov 19 2020, 3:15 PM.

Details

Summary

this is problematic if we override default mounts by setting ensure: absent

Test Plan

no diffs on workers

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

site-modules/profile/manifests/mountpoints.pp
26

shouldn't the mount be conditional to the ensure value too ?

site-modules/profile/manifests/mountpoints.pp
26

* => $mount_config will override all the default: values with ones that come from the $mount_config hash. So, when ensure => absent is passed in the config, that'll carry over to the resource.

vsellier added inline comments.
site-modules/profile/manifests/mountpoints.pp
26

Ah yes, you are right. powerful feature (too for me :) )

This revision is now accepted and ready to land.Nov 19 2020, 4:08 PM