JGonza1
2012-Oct-09 18:26 UTC
[Puppet Users] Answer a question after a command has been run in a init.pp in a module.
I have the command below in a init.pp file that I run to startup splunk for the first time but it outputs the license agreement which requires to input a y or n. Is there a way to input a y after the lincese agreement? exec { "start": command => "/opt/splunkforwarder/bin/splunk start", } I have tried to redirect a y in the command below but it did not work. exec { "start": command => "/opt/splunkforwarder/bin/splunk start < y", } -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/e0p23HYdbYQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Gonzalo Servat
2012-Oct-09 21:06 UTC
Re: [Puppet Users] Answer a question after a command has been run in a init.pp in a module.
On Wed, Oct 10, 2012 at 5:26 AM, JGonza1 <jgonza1495@gmail.com> wrote:> I have the command below in a init.pp file that I run to startup splunk > for the first time but it outputs the license agreement which requires to > input a y or n. Is there a way to input a y after the lincese agreement? >According to http://docs.splunk.com/Documentation/Splunk/latest/Installation/Startsplunkforthefirsttime : To accept the license automatically when you start Splunk for the first time, add the accept-license option to the start command: $SPLUNK_HOME/bin/splunk start --accept-license - Gonzalo -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Michael Dodwell
2012-Oct-09 22:36 UTC
[Puppet Users] Re: Answer a question after a command has been run in a init.pp in a module.
For future reference you where trying to do: command => "yes | /opt/splunkforwarder/bin/splunk start", ''yes'' is a unix program that will type ''y'' over and over again.. you could also of used ''echo y | <splunk>'' if you needed just 1 y.. On Wednesday, October 10, 2012 5:26:37 AM UTC+11, JGonza1 wrote:> > I have the command below in a init.pp file that I run to startup splunk > for the first time but it outputs the license agreement which requires to > input a y or n. Is there a way to input a y after the lincese agreement? > > exec { "start": > command => "/opt/splunkforwarder/bin/splunk start", > } > I have tried to redirect a y in the command below but it did not work. > exec { "start": > command => "/opt/splunkforwarder/bin/splunk start < y", > } > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/hN5rvvsIKRQJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.