$realname =
regsubst(generate('/usr/bin/readlink','/opt/level3/component/ams/repo/current'),'^(.*)\n$','\1')
On Thursday, May 3, 2012 12:03:59 PM UTC-6, rjl wrote:
Hi,
It seems like this should be pretty easy but I can't find a solution.
On my puppet master, I have a directory of zipped files. These are created
by another application. When a new zipped file is added to the directory,
the other application attaches a symlink to it called current.
/somepath/repo-1.tar.gz -> current
Then later...
/somepath/repo1.tar.gz
/somepath/repo-2.tar.gz -> current
I want puppet to copy the file pointed to by 'current' to the clients.
So far I have the following which will copy the file but, the name of the
file on the client is 'current'. I want it to be the actual name of the
file and not the name of the link.
class ams::config
{
file {
"ams_repos":
path => "/tmp/current", #????
owner => 'root',
group => 'root',
mode => 0644,
backup => true,
ensure => present,
links => follow,
source => "puppet:///repo_files/current",
}
}
Any help would be greatly appreciated.
Thanks in advance!
--Hi,
It seems like this should be pretty easy but I can't find a solution.
On my puppet master, I have a directory of zipped files. These are created
by another application. When a new zipped file is added to the directory,
the other application attaches a symlink to it called current.
/somepath/repo-1.tar.gz -> current
Then later...
/somepath/repo1.tar.gz
/somepath/repo-2.tar.gz -> current
I want puppet to copy the file pointed to by 'current' to the clients.
So far I have the following which will copy the file but, the name of the
file on the client is 'current'. I want it to be the actual name of the
file and not the name of the link.
class ams::config
{
file {
"ams_repos":
path => "/tmp/current", #????
owner => 'root',
group => 'root',
mode => 0644,
backup => true,
ensure => present,
links => follow,
source => "puppet:///repo_files/current",
}
}
Any help would be greatly appreciated.
Thanks in advance!
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/-/a3OSBsn4R5YJ.
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.