file { "/var/log/syslog": target => "/var/log/messages" } generates the following error: err: //henson/stanford/syslog/file=/var/log/syslog: Failed to retrieve current state: undefined method `should'' for false:FalseClass
--On Friday, September 15, 2006 1:01 PM -0700 Digant C Kasundra <digant@stanford.edu> wrote:> file { "/var/log/syslog": > target => "/var/log/messages" > } > > > generates the following error: > > err: //henson/stanford/syslog/file=/var/log/syslog: Failed to retrieve > current state: undefined method `should'' for false:FalseClass >That''s if the file /var/log/syslog exists. If it doesn''t, i get the following error: err: //henson/stanford/syslog/file=/var/log/syslog/target: change from absent to /var/log/messages failed: undefined method `insync?'' for false:FalseClass
On Sep 15, 2006, at 3:03 PM, Digant C Kasundra wrote:> That''s if the file /var/log/syslog exists. If it doesn''t, i get the > following error: > > err: //henson/stanford/syslog/file=/var/log/syslog/target: change from > absent to /var/log/messages failed: undefined method `insync?'' for > false:FalseClassApparently I''m not testing the ''target'' state separately. I''ll file that as a bug, but in the meantime, just use ensure: file { "/var/log/syslog": ensure => "/var/log/messages" } I''ve verified that works. -- Luke Kanies http://madstop.com | http://reductivelabs.com | 615-594-8199
On Sep 15, 2006, at 3:08 PM, Luke Kanies wrote:> > Apparently I''m not testing the ''target'' state separately. > > I''ll file that as a bug, but in the meantime, just use ensure: > > file { "/var/log/syslog": > ensure => "/var/log/messages" > } > > I''ve verified that works.Alternatively, add an ''ensure => link'', which also works. -- Luke Kanies http://madstop.com | http://reductivelabs.com | 615-594-8199
> Apparently I''m not testing the ''target'' state separately. > > I''ll file that as a bug, but in the meantime, just use ensure: > > file { "/var/log/syslog": > ensure => "/var/log/messages" > } > > I''ve verified that works. >err: //henson/stanford/syslog/file=/var/log/syslog/target: change from absent to /var/log/messages failed: undefined method `insync?'' for false:FalseClass
Digant C Kasundra wrote:> > err: //henson/stanford/syslog/file=/var/log/syslog/target: change from > absent to /var/log/messages failed: undefined method `insync?'' for > false:FalseClassThen there''s something distinctly different about this circumstance. Can you get it to work in a simple example manifest? I reproduced the problem when using ''target'' by itself, but if ''ensure'' is set to ''link'', then I get consistently good behaviour. -- As a general rule, don''t solve puzzles that open portals to Hell. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
--On Friday, September 15, 2006 3:55 PM -0500 Luke Kanies <luke@madstop.com> wrote:> Digant C Kasundra wrote: >> >> err: //henson/stanford/syslog/file=/var/log/syslog/target: change from >> absent to /var/log/messages failed: undefined method `insync?'' for >> false:FalseClass > > Then there''s something distinctly different about this circumstance. > Can you get it to work in a simple example manifest? > > I reproduced the problem when using ''target'' by itself, but if ''ensure'' > is set to ''link'', then I get consistently good behaviour. >Yes, with target specified and ensure set to link, it work as expected. Sorry. At first I thought you said to make ensure equal to what I was linking to.
Digant C Kasundra wrote:> > Yes, with target specified and ensure set to link, it work as expected. > Sorry. At first I thought you said to make ensure equal to what I was > linking to.Either one works for me, and I''d expect them to work for you, too. -- As a general rule, don''t solve puzzles that open portals to Hell. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
> Digant C Kasundra wrote: >> >> Yes, with target specified and ensure set to link, it work as expected. >> Sorry. At first I thought you said to make ensure equal to what I was >> linking to. > > Either one works for me, and I''d expect them to work for you, too. >You are correct sir!