I'm trying to use puppet to move some folders from one directory to another
in Windows.
That being said I have a parameterized define which looks like that:
define module_name::move ($dir_name, $arg2){
$dir_origin = "c:/${dir_name}"
$dir_destination = "c:/tmp/${arg2}"
file { $dir_destination:
ensure => 'directory',
mode => '755',
}
exec { $backup_folder :
command => "cmd.exe /c move $dir_origin $dir_destination",
path => 'c:\windows\system32;c:\windows',
}
}
and I call the define as follow:
module_name::move { 'folder_name':
dir_name => ['dir1','dir2','dir3'],
arg2 => blah,
}
when I execute this code, puppet concatenate the value of $dir_name as
dir1dir2dir3 instead of running my define 3 separate times.
I would greatly appreciate getting some help on how I could reach my
purpose.
Thanks,
Mike
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/j8s4ytdFlk0J.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.