Glassfish automatic installation in Puppet

253 views
Skip to first unread message

Jithin Xavier

unread,
Feb 26, 2013, 3:22:18 AM2/26/13
to puppet...@googlegroups.com
Hi All,

Can any one help to install my jar file automatically,

When I tried to install /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar,its is asking for confirmation like Accept or Decline? [A,D,a,d]. So how can I pass answer with command.

Please find my puppet code below

              exec { 'glassfishInstaExe':
               command => "/usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar",
               cwd => "/gx/mnt/software/Vidispine/Components",
                }

Thanks,
Jxavier

Nikola Petrov

unread,
Feb 26, 2013, 3:34:51 AM2/26/13
to puppet...@googlegroups.com
Not sure if this will help you at all but you can try the yes[1]
command.

Try to change your exec to:

exec { 'glassfishInstaExe':
command => '/usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar',
cwd => '/gx/mnt/software/Vidispine/Components',
}



[1] http://en.wikipedia.org/wiki/Yes_(Unix)


--
Nikola
> --
> 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...@googlegroups.com.
> To post to this group, send email to puppet...@googlegroups.com.
> Visit this group at http://groups.google.com/group/puppet-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Jithin Xavier

unread,
Feb 26, 2013, 4:26:18 AM2/26/13
to puppet...@googlegroups.com
Thanks Nikola,

for some reason its not working.. I am getting this error now

err: /Stage[main]/Vidispine/Exec[glassfishInstaExe]/returns: change from notrun to 0 failed: /usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar returned 1 instead of one of [0] at /etc/puppetlabs/puppet/modules/vidispine/manifests/init.pp:17.

Thanks,
Jithin

--
-Regards
Jithin Xavier

Nikola Petrov

unread,
Feb 26, 2013, 4:31:59 AM2/26/13
to puppet...@googlegroups.com
Please run the command outside of puppet or run puppet with

--debug --trace

to see what failed. Error status code of 1 can be anything on
earth ;)

--
Nikola

Jithin Xavier

unread,
Feb 26, 2013, 5:07:50 AM2/26/13
to puppet...@googlegroups.com
This command "/usr/bin/yes | /usr/bin/java -Xmx256m -jar /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar --debug --trace" not giving me any useful information.

Glassfish installation is asking for, Accept or Decline? [A,D,a,d].. So we wanted to answer this question.

is there anyway to answer for this through command line?

Thanks,
Jithin





You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/0i1ChNoJSKA/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to puppet-users...@googlegroups.com.

To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Nikola Petrov

unread,
Feb 26, 2013, 8:11:13 AM2/26/13
to puppet...@googlegroups.com
Well check the same command (yes) and it's man page

yes A | shell-script

should give you what you want

--
Nikola

On Tue, Feb 26, 2013 at 03:37:50PM +0530, Jithin Xavier wrote:
> This command "/usr/bin/yes | /usr/bin/java -Xmx256m -jar
> /gx/mnt/software/Vidispine/Components/glassfish-installer-v2.1.1-b31g-linux.jar
> --debug --trace" not giving me any useful information.
>
> Glassfish installation is asking for, *Accept or Decline? [A,D,a,d]*.. So
Reply all
Reply to author
Forward
0 new messages