Forgot to mention some important details: # cat /etc/debian_version 6.0.2 # puppet --version # Take 1: Debian default 2.6.2 # puppet --version # take 2: Debian Backports 2.7.1
On 11 Aug 2011, at 10:42, Tom De Vylder wrote: > Hi all, > > I'm trying to distribute a PHP file as a template. > The problem I'm running into is that each variable in the PHP file is > recognized as a Puppet or ERB variable. > > Take this snippet for instance: > > # cat include/init.php > <?php > $dbhost = '<%= app_dbhost %>'; > $dbname = '<%= app_dbname %>'; > $dbuser = '<%= app_dbuser %>'; > $dbpass = '<%= app_dbpass %>'; > ?> > > When running this in Puppet I get the following error: > > info: Applying configuration version '1311757652' > err: /Stage[main]/app::Config/File[/var/www/app/include/init.php]: Could not > evaluate: Cannot find file: Invalid path '$dbhost = 'localhost'; > $dbname = 'app_db'; > $dbuser = 'user1'; > $dbpass = 'spoofed';' Could not retrieve file metadata for $dbhost = > 'localhost'; > $dbname = 'app_db'; > $dbuser = 'user1'; > $dbpass = 'spoofed';: Cannot find file: Invalid path '$dbhost = 'localhost'; > $dbname = 'app_db'; > $dbuser = 'user1'; > $dbpass = 'spoofed';' at /etc/puppet/modules/app/manifests/init.pp:64 > > As you can see the actual ERB parts are filled in nicely but it fails on > PHP's variables. > I've tried escaping the variables and equation marks. I've also renamed the > php file not to end with *.erb. To no avail. > > Is there a way to avoid this behavior? > > Kind regards, > TomDV > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.