Tput: unknown terminal "unknown" rhel - packer build - multiple prompt for shell script


I am trying to install nagiosxi log server into a AWS ec2 using packer, i am calling a shell script from packer build which installs nagiosxi on ec2 rhel vm. Nagiosxi installation expecting multiple prompt as confirmation of installation “yes” and i have used below script as a fix.

tar xzf xi-latest.tar.gz
cd nagiosxi
(echo “y”; echo “y”) | sudo ./fullinstall

trying to provide multiple prompt using this command (echo “y”; echo “y”). Its failing with below error.

tput: unknown terminal “unknown”
==> fmt: option requires an argument – ‘w’
==> Try ‘fmt --help’ for more information.
==> Provisioning step had errors: Running the cleanup provisioner, if present…

Any help on this is appreciated. thank you.