while setting up a squid module i came across a problem trying to use a
template of "squid.conf".
the following text in "squid.conf" raises an error from puppet,
without
this text the template works.
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
refresh_pattern -i exe$ 0 50% 999999
refresh_pattern -i zip$ 0 50% 999999
refresh_pattern -i tar\.gz$ 0 50% 999999
refresh_pattern -i tgz$ 0 50% 999999
refresh_pattern -i cab$ 0 50% 999999
refresh_pattern -i msi$ 0 50% 999999
the error is
debug: Retrieved configuration in 1.57 seconds
err: Could not retrieve configuration: Could not understand
configuration: syntax error on line 3192, col 17: `
|+2''
debug: Creating default schedules
the manifest
file { "/etc/squid/squid.conf":
content => template("proxy/squid.conf.erb"),
owner => root,
group => squid,
mode => 640,
require => Package["squid"],
notify => Service["squid"];
}
Any idea how i might get around this little problem?
Ben
On Oct 30, 2007, at 9:48 PM, Ben wrote:> while setting up a squid module i came across a problem trying to > use a > template of "squid.conf". > > the following text in "squid.conf" raises an error from puppet, > without > this text the template works. > [..] > the error is > > debug: Retrieved configuration in 1.57 seconds > err: Could not retrieve configuration: Could not understand > configuration: syntax error on line 3192, col 17: > ` |+2'' > debug: Creating default schedules > > the manifest > [...] > Any idea how i might get around this little problem?My guess is that you need to escape something for ERB. Try a simple, stand-alone Puppet script that uses that template, and then hit the ERB docs looking for how you need to escape those % characters, if at all (I''m only guessing that they''re the problem). -- You will notice that BeOS has taken the best parts from all the major operating systems and made them its own. We''ve got the power of the Unix command line, the ease of use of the Macintosh interface, and Minesweeper from Windows. -Tyler Riti --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com