Skip to content

Stupid Puppet Trick: Agreeing to the Sun Java License with Debconf Preseeds and Puppet

I had a user ask for Java to be installed on the cluster systems, so I started up by making a simple JRE5 module for puppet, but this first one didn’t quite work:

class jre5 {
  package { "sun-java5-jre":
    ensure => latest;

It doesn’t work because Sun wants you to agree to its license before installing the JRE. There’s a couple of ways around this. First, the old-school method:

ssh host "yes | apt-get -y install sun-java5-jre"

where ‘yes’ is a standard Unix program that just prints out “yes” over and over until the program on the other side of the pipe terminates. But “ssh host foo” is not the way of the managed infrastructure.

The second method, much more friendly to centralized management, is to first install debconf-utils on a candidate system, and then install sun-java5-jre on the same system. Once that’s done, you can query the debconf database to see how it stored your answers to the Sun license agreement:

ch226-12:~# debconf-get-selections | grep sun-
sun-java5-bin   shared/accepted-sun-dlj-v1-1    boolean true
sun-java5-jre   shared/accepted-sun-dlj-v1-1    boolean true
sun-java5-jre   sun-java5-jre/jcepolicy note
sun-java5-jre   sun-java5-jre/stopthread        boolean true
sun-java5-bin   shared/error-sun-dlj-v1-1       error
sun-java5-jre   shared/error-sun-dlj-v1-1       error
sun-java5-bin   shared/present-sun-dlj-v1-1     note
sun-java5-jre   shared/present-sun-dlj-v1-1     note

Save those results (debconf seeds) into a file on the gold server. Then we can modify our jre5 class as follows:

class jre5 {
  package { "sun-java5-jre":
    require      => File["/var/cache/debconf/jre5.seeds"],
    responsefile => "/var/cache/debconf/jre5.seeds",
    ensure       => latest;

  file { "/var/cache/debconf/jre5.seeds":
    source => "puppet:///jre5/jre5.seeds",
    ensure => present;

Now our class will download the preseeded answers for the Java license, download and install the JRE, and then use the preseeded answers to skip past the license agreement. I had never messed with debconf seeding previously, since I had either just imaged my systems, or provided config files that would be used when I restarted any daemons or programs that depended on those files. Now debconf-utils is part of my standard system class definition.

Note that this method doesn’t work with the default puppet provided in Debian Etch (version 0.20) — the responsefile parameter for Debian packages was only added in puppet 0.22.

{ 17 } Comments

  1. Login KIK Messenger | March 7, 2019 at 6:30 am | Permalink

    KIK Messenger is now available for Android, iOS, Windows and even for PC, making it the cross-platform messaging application. But, when it comes to Download KIK for PC: Windows & Laptop, there are few things which you need to do in order to access the messenger on your PC. The steps for downloading KIK Messenger on PC are mentioned below and you need to carefully go through the step for successful installation.

  2. Web Solution Winner | March 8, 2019 at 2:40 am | Permalink

    Web Solution Winner is The World’s Most Successful Blog. We write about Technology, Business, Entertainment, Lifestyle, Digital Marketing, Travel, USA, UK, Canada.

  3. | March 11, 2019 at 3:29 am | Permalink

    great site!

  4. Website Designing Co | March 11, 2019 at 4:21 am | Permalink

    Really informative blog. Thank you so much for sharing this blog with us. Visit Ogen Infosystem for the best Website Designing and Development Services.

  5. | March 14, 2019 at 11:57 pm | Permalink

    really impressive post

  6. Assignment help | March 16, 2019 at 5:46 am | Permalink

    I like your article posting is very great.Thanks for this stuff.

  7. faceTime windows app | March 16, 2019 at 2:15 pm | Permalink

    The methods which are used is centralized. good blog useful

  8. faceTime windows app | March 16, 2019 at 2:17 pm | Permalink

    good blog useful

  9. Gta v highly compres | March 17, 2019 at 8:25 pm | Permalink

    thank for sharing this post

  10. ocean of games | March 17, 2019 at 8:25 pm | Permalink

    thank for sharing

  11. Uber Support | March 19, 2019 at 4:38 pm | Permalink

    What a useful information provided by this blog! It’s remarkable. Thanks for helping me out… I will definitely get in touch with your blogs,click for content writing services.
    Thank You.

  12. nicholas garrett | March 23, 2019 at 6:33 pm | Permalink

    For the same reason, none of the subscribers ever faces any kind of problem when it comes to experience the world-class services for better connectivity to remain in sync with the latest trends and standards. You essentially need to know the administration and management of Spectrum always take the best care for subscribers’ gains. Thus, never compromise on the professionalism. Existing services available over Spectrum support phone number are nevertheless free of all kinds of loopholes and drawbacks.

  13. | March 25, 2019 at 1:14 am | Permalink

    Showbox is one the best app to watch your favorite movies & TV shows. Stream any video or download movies & TV Shows for free.

  14. Official App | March 25, 2019 at 1:15 am | Permalink

    Showbox is one the best app to watch your favorite movies & TV shows. Stream any video or download movies & TV Shows for free.

  15. Akash | March 25, 2019 at 1:19 am | Permalink

    If you are looking for the IoT solutions, feel free to contact us. We are one of the best End to End IoT solution provider.

  16. Coupon Mall | March 25, 2019 at 1:35 am | Permalink

    Your search for great deals and coupon savings ends here. Find the best bargains and money-saving offers, discounts, promo codes, freebies and price

  17. ppc company in noid | March 26, 2019 at 1:14 am | Permalink

    we have provide the best ppc service.

Post a Comment

Your email is never published nor shared. Required fields are marked *