I have the exec resource defined as follows, to be able to install tcserver using a command line, inside of my init.pp. For some reason, it is not able to execute the install command, when I run puppet agent -t on the agent
exec { "tomcat-conf":
path => '/opt/vmware/vfabric-tc-server-standard:/bin:/usr/bin:/sbin:/usr/sbin',
cwd => "/opt/vmware/vfabric-tc-server-standard",
command => " '. /etc/profile.d/vimo_envs.sh' /opt/vmware/vfabric-tc-server-standard/tcruntime-instance.sh create --instance-directory=/opt/apps/stage/tcserver/mshix-stg --java-home=/opt/apps/stage/Java/jdk1.6.0_45 tcserver_app",
timeout => 0,
logoutput => 'true',
subscribe => File["/etc/profile.d/vimo_envs.sh"],
refreshonly => true,
}
JAVA_HOME=/opt/apps/stage/Java/jdk1.6.0_45 is provided by /etc/profile.d/vimo_envs.sh, and required at the time of creating tc server instance.
When I invoke puppet agent, it is able to create an empty directory /opt/apps/stage/tcserver/mshix-stg. But nothing else.
There are no sub-directories containing the conf/ bin/ . I don't get a complete configuration
I can run the tcruntime-instance.sh from command line successfully but not from within puppet.
Any suggestions ? thanks