On Friday, January 17, 2014 8:01:08 PM UTC-6, Sam Rajagopal wrote:
>
> 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
>
>
First, it looks like you want

  provider => 'shell'

in your command.  Second, it looks like you want a semicolon in the 
command, after '. /etc/profile.d/vimo_envs.sh'.  Third, having switched to 
the "shell" provider you will probably need to remove the internal single 
quotes.

As it is now, I think your environment setup script is being run as the 
command, with the real command passed to it as an argument.


John

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/13751900-753c-47d3-952e-d65e8af1342d%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to