I tried to override the $target path for a call to staging::file. What I found was that nothing was happening until I specified the full path, including filename.
The documentation for staging::file indicates:
$target = undef, #: the target staging directory, if unspecified ${staging::path}/${caller_module_name}
Looking at the source below from file.pp you can see if the $target is specified, $target_file is set to the submitted value which, in my case, is a folder. If $target is not specified, $target_file is set to ${staging_dir}/${name} (${name} would be the resource title here I would imagine?):
The reason nothing was happening (no file copy and no error) was due to your Idempotent check. I was creating the folder in another task. Your check would fire, checking if the "folder" existed, and move on.
Hi guys,
I tried to override the $target path for a call to staging::file. What I found was that nothing was happening until I specified the full path, including filename.
The documentation for staging::file indicates:
Looking at the source below from file.pp you can see if the $target is specified, $target_file is set to the submitted value which, in my case, is a folder. If $target is not specified, $target_file is set to ${staging_dir}/${name} (${name} would be the resource title here I would imagine?):
The reason nothing was happening (no file copy and no error) was due to your Idempotent check. I was creating the folder in another task. Your check would fire, checking if the "folder" existed, and move on.
Hope this makes sense,
Michael