You said it was from a tar file from artifactory, but does untaring the file install it, or do you have to untar it, then run a script (to actually install it) and the script asks for input?
What you are looking for is similar to
Try it and see if it works on it's own inside of your terminal. If you are running a script that is expecting input of
7, try doing something like
(printf "n\ny\n7\n" && cat) | some_tool
There are some programs that intentionally make it difficult to insert stdin in that fashion, for those things (like needing to automate the entry of a password into ssh where you can't use keys, or automating a complex menu interaction for configuring a network device) I usually reach for Expect. I have written two different articles on using the tool (here and here). You may be able to wrangle the install using expect if the normal stdin redirection doesn't work.
As far as all of this in the context of puppet - it would probably be best to manage the tar file from artifactory via the archive module, and then either have either the stdin redirection command or an expect command functioning inside of an
exec with appropriate
unless statements to make it idempotent, or write a custom type and provider to wrap the interaction for performing the install.