I'm trying to figure out if remounting a different device is possible, and how if so. I might be missing something very simple, but here goes. Currently for example I have a resource mounting EFS similar to the following:
mount '/mnt/mountpoint' do
action [:mount, :enable]
Which works just fine as expected, it gets mounted, subsequent runs don't mess with it or create duplicate mounts, etc. Suppose that at some later point I change that to
instead. As expected, the following error is produced:
STDERR: mount.nfs: /mnt/mountpoint is busy or already mounted
This is using the most recent chef client (12.14.89). If I duplicate the resource and call it to unmount first, then it doesn't do anything (I suspect due to the same resource name). I could have a conditional that grabs the current volume name and umount/disable on the first run, then mount/enable the correct one on the next run. However that's obviously not ideal as it's better for this to happen on the same run.
Any advice would be quite appreciated.