# difference in outcome: puppet agent --test - normal run through interval [closed]

Hi there,

i've been trying to get a manifest going what should cover something really basic.

class dms::update{

exec {'work.bat':
path => "C:\jetty8\depot",
refreshonly => true,
}
->
exec {'service.bat':
path => "C:\jetty8\depot",
refreshonly => true,
}
->
file{'c:\jetty8\work':
ensure => directory,
}
->
file{'dms_update':
ensure => file,
source => 'c:\jetty8\depot\dms-connector.war',
path => 'c:\jetty8\webapps\dms-connector.war',
}

service{'JettyService':
ensure => true,
subscribe => File['dms_update'],
}
}


and my other class

class dms::copy {

file{'c:\jetty8\depot':
ensure => directory,
}

file{'service.bat':
ensure => file,
source => 'puppet:///modules/dms/service.bat',
path => 'c:\jetty8\depot\service.bat',
source_permissions => ignore,
require => File['c:\jetty8\depot'],
}

file{'work.bat':
ensure => file,
source => 'puppet:///modules/dms/work.bat',
path => 'c:\jetty8\depot\work.bat',
source_permissions => ignore,
require => File['c:\jetty8\depot'],
}

file{'dms_connector':
ensure => file,
source => 'puppet:///modules/dms/dms-connectorneu.war',
path => 'c:\jetty8\depot\dms-connector.war',
require => File['c:\jetty8\depot'],
notify => [Exec["service.bat"],Exec["work.bat"]],
}
}


the service.bat is a quick loop to check if service is running and stopping it if it is work.bat deletes the content of a folder in which the .war file is unzipping

My problem is, this will work perfectly fine if it is run through the interval giving in the puppet.conf but it wont if i run the puppet agent --test shortcut

by running the shortcut, the service.bat doesnt run propperly (i added echo=>logfile so i would get feedback what part was run and what wasnt) so the service isnt getting stopped and the .war file cant be replaced

is that more of a selfmade problem, with my nooby manifest and lack of puppet knowledge? i've been working with puppet for about a week and i've come quite far with try and error, but that just seems really odd, the difference in outcome since it should do the same thing shouldnt it?

the funny part is i left work yesterday with a good feeling, the manifest was running propperly with interval runs and manualy triggered puppet runs, i have tried getting my client to work with a proxyserver, which didnt work out and was going back to what should have been working fine, i have no clue as to why it wont to it anymore today.

any hint/solution would be greatly appreciated

greetings robert

edit retag reopen merge delete