Q:

Puppet - change permission of file with variable

How would you use puppet to change the permissions of a file which does not have a consistent name?  
My task is to manage a binary that has the date appended to the end of it like so:
lrwxrwxrwx 1 root root       18 Oct 25 18:46 apbridge -> ./apbridge20131025
lrwxrwxrwx 1 root root       18 Oct 25 18:46 apbridge1025 -> ./apbridge20131025
-rwxr-xr-x 1 root root     2914 Oct 25 18:46 apbridge20131025

apbridge20131025 has the wrong permissions.  Normally the following would change it: 
  file  {'/root/alpsSim/alps_simulator_r7537/tester/apbridge20131025':
    owner   =>  'root',
    group   =>  'root',
    ensure  =>  file,
    mode    => '0755',
  }

However because I can not predict what numbers apbridge will end in, this will be very likely to break.  
I don't have control over the name of apbridgexxxxx as it is installed by a 3rd party script.  The numbers at the end represent the day it was installed.  
Is there a way to use a wildcard in a puppet file resource declaration?  

A:

I suggest you make use of exec:
exec { 'apbridge':
  command => 'find /root/alpsSim/alps_simulator_r7537/tester/ -maxdepth 1 -type f -iname "apbridge*" -exec chmod 755 {} \;',
  path    => '/bin:/sbin:/usr/bin:/usr/sbin',
}

