On 06/25/2013 05:47 PM, Chris Hagan wrote:
Hi puppeteers!
I'm just starting out on this journey, and any help, stylistic or
functional, would be greatly appreciated.
This is a puppet file describing several chained steps, in a linear
dependent sequence. The last, having built up all the systemic
dependencies, is to run a maven web server task.
The output for this task is "returns: executed successfully". But the
server hasn't been started and when I look at the directory, it's clear
that the build and compile haven't even been run. Is it obvious to anyone
why this exec step says it's finished but doesn't seem to have done?
centos.pp:
Exec { path => [ "usr/local/bin", "/bin/", "/sbin/" , "/usr/bin/",
"/usr/sbin/", "/srv/apps/jdk-7/bin", "/srv/apps/maven/bin",
"/home/vagrant/bin" ] }
java::setup { "vagrant-jdk7":
ensure => 'present',
source => 'jdk-7u25-linux-x64.tar.gz',
deploymentdir => '/srv/apps/jdk-7',
user => 'vagrant',
pathfile => '/home/vagrant/.bashrc'
} ->
maven::setup { "vagrant-maven":
ensure => 'present',
source => 'apache-maven-3.0.5-bin.tar.gz',
deploymentdir => '/srv/apps/maven',
user => 'vagrant',
pathfile => '/home/vagrant/.bashrc',
} ->
package { 'git':
ensure => installed,
} ->
exec { "open firewall":
command => 'service iptables stop',
} ->
file { '/srv/loadShop/':
ensure => 'absent',
force => 'true',
} ->
vcsrepo { '/srv/loadShop/':
ensure => latest,
provider => git,
source => <git server url removed>,
} ->
exec { "run application":
cwd => '/srv/loadShop/loadShop/',
command => 'mvn jetty:run &',
environment => 'MAVEN_OPTS="-XX:+CMSClassUnloadingEnabled
-XX:PermSize=256M -XX:MaxPermSize=512M"',
logoutput => true,
}
Output:
Notice:
/Stage[main]//Java::Setup[vagrant-jdk7]/File[/var/run/puppet/java_set
working-vagrant-jdk7/jdk-7u25-linux-x64.tar.gz]/ensure:
defined content as <md5 removed>
Notice:
/Stage[main]//Java::Setup[vagrant-jdk7]/Exec[extract_java-vagrant-jdk7 returns:
executed successfully
Notice: /Stage[main]//Exec[open firewall]/returns: executed successfully
Notice: /Stage[main]//File[/srv/loadShop/]/ensure: removed
Notice: /Stage[main]//Vcsrepo[/srv/loadShop/]/ensure: Creating repository
from latest
Notice: /Stage[main]//Vcsrepo[/srv/loadShop/]/ensure: created
Notice: /Stage[main]//Exec[run application]/returns: executed successfully
Notice: Finished catalog run in 162.61 seconds
Thanks in advance for any advice.
I think that /usr/local/bin needs a leading slash:
Exec { path => [ "< insert slash here >usr/local/bin", "/bin/", "/sbin/" ,
"/usr/bin/",
"/usr/sbin/", "/srv/apps/jdk-7/bin", "/srv/apps/maven/bin",
"/home/vagrant/bin" ] }
--
You received this message because you are subscribed to the Google Groups "Puppet
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to puppet-users+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.