The Oracle Java package for Ubuntu interactively asks about the License Agreement. So I have to say 'OK' and then 'yes' every time, but I'd like to automate it. What I do is this:
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get -y install oracle-java7-installer
Is there a simple way to automate the agreement process without using expect?
If you are using Chef for provisioning your servers with Oracle Java you can do the following in a bash execute resource.
Working off maxym's answer above
try this out:
running 3rd and 4th command on my debian 7.1 helps, so I think the same can help on ubuntu as well
If you are using Ansible for automation you may want to put this into your playbook:
Note: The
value
argument indebconf
must be set to"true"
, including the quotes, as per comment by Roy Wood.