Page MenuHomeSoftware Heritage

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

Authored by olasd on Thu, Nov 19, 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

olasd created this revision.Thu, Nov 19, 3:15 PM
vsellier added inline comments.Thu, Nov 19, 3:55 PM
site-modules/profile/manifests/mountpoints.pp
26

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

olasd added inline comments.Thu, Nov 19, 4:02 PM
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 accepted this revision.Thu, Nov 19, 4:08 PM
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.Thu, Nov 19, 4:08 PM