I tried *many* different invocations of the mount module from w/i my
manifest to no avail.
However, I got it working by writing an Applescript one-liner:
tell application "Finder" to open location "smb://[USER]:[PASSWORD]@[SMB
HOST]/[SMB SHARE]"
The Mac node downloads this script, executes it, et voila(!) an SMBFS share
that you can find in the Finder Sidebar. These are my manifest mods:
file { '/usr/local/sbin/mac_mount_[SHARENAME].scpt': ensure => file, source
=> 'puppet:///modules/mac/mac_mount_[SHARENAME].scpt', owner => 'root',
group => 'wheel', mode => '0755', } exec {'Mount smbfs share': command =>
'/usr/bin/osascript /usr/local/sbin/mac_mount_[SHARENAME].scpt', }
Hope that helps someone in need.
Cheers,
Marshall
On Monday, November 27, 2017 at 1:31:22 PM UTC-8, [email protected] wrote:
>
> Hi,
>
> I have created an SMB share that I can manually mount through Finder -> Go
> -> Connect to Server.
> It shows up under /Volumes in the Finder Sidebar correctly. The OS
> usefully sets the mount point owned by
> me and under the group 'staff' with mount point permissions 0755.
>
> Using the mount module I can mount this same share, but I am unable to
> mount it under /Volumes, or get
> it to be in group 'staff' instead of 'wheel', or to show up in the Finder
> Sidebar. Here is my mount invocation:
>
> file { '/Users/Shared/mnt':
> ensure => 'directory',
> }
> mount {'/Users/Shared/mnt':
> name => '/Users/Shared/mnt',
> device => '//[USER]:[PASSWORD]@[SMB HOST]/[SMB SHARE]',
> atboot => 'true',
> options => '-d=755',
> ensure => 'mounted',
> fstype => 'smbfs',
> require => File['/Users/Shared/mnt'],
> notify => Exec['fix_mount_perms'],
> }
> exec { 'fix_mount_perms':
> command => '/bin/chmod 0755 /Users/Shared/mnt &&
> /usr/bin/chgrp staff /Users/Shared/mnt',
> refreshonly => true
> }
>
> I'd love to know the correct mount methodology that simulates what my Mac
> (10.13.1) is doing natively.
>
> Thanks!
>
> Marshall
>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/b1170955-af65-4874-935e-91f456852cdd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.