Question

I'm trying to copy files from a windows share to my node's cache. Apparently there's no way to do that from remote_file so my alternative thought is to try and mount the windows share to a local drive and access the files I need via the file resource. However even though Chef is telling me the mount succeeded I'm unable to see the share and access it on the node.

mount "H:" do
  device "\\\\ \\software"
  action :mount
end

Just like https://tickets.opscode.com/browse/CHEF-1267 suggests.

However this isn't working:

Recipe: ossec::default←[0m
  * mount[H:] action mount←[0m[2014-06-04T07:37:03-07:00] INFO: Processing mount
[H:] action mount (ossec::default line 20)
[2014-06-04T07:37:03-07:00] INFO: mount[H:] mounted
←[32m
    - mount  to H:←[0m
←[0m
[2014-06-04T07:37:07-07:00] INFO: Chef Run complete in 3.8376 seconds
[2014-06-04T07:37:07-07:00] INFO: Running report handlers
[2014-06-04T07:37:07-07:00] INFO: Report handlers complete
Chef Client finished, 1 resources updated←[0m

Based on this output the share is getting mounted, however it's no available on the windows node.

Was it helpful?

Solution

This is normal. Windows drive mappings are not shared across sessions, so drives mapped in the session where Chef is running are not visible in any other sessions. In addition, mappings are not persistent by default so a mapping made in one Chef session will not be available (by default) in later sessions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top