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.

{ 49 } Comments

  1. Robin | April 7, 2009 at 1:46 am | Permalink

    When I ran debconf-get-selections, the various ‘accepted’ fields had the value ‘select true’. This still causes you to be asked (or, if using puppet, the install to fail.) So this is a note to anyone else finding this: make sure that they are ‘boolean true’ as they are in this post. It turns out to be something that takes about 45 minutes of staring to work out :)

  2. Robin | April 7, 2009 at 3:22 am | Permalink

    Additionally, there must not be more than a single space between ‘boolean’ and ‘true’ or you may spend a very long time figuring it out again.

    Even if that’s what debconf-get-selections provides in your case.

  3. Mike Renfro | April 7, 2009 at 8:54 am | Permalink

    Odd. I don’t recall editing anything in the debconf output; it may have changed with the Lenny release? Might be something else entirely, too.

  4. Soren Vind | January 28, 2010 at 5:18 am | Permalink

    Thank you SO much for this! Have been looking around for a while for a good solution to that problem. It is quite painful to accept the license agreement manually on tens of servers :)

  5. Jan | May 12, 2010 at 7:47 am | Permalink

    Thank you. Also: I run Lenny on my machines and I didn’t have to edit the debconf-get-selections output.

  6. Peter Sankauskas | December 9, 2010 at 9:13 pm | Permalink

    This is awesome! Thank you very much. If I get time, I will repost this on my blog updated for Ubuntu 10.04, Puppet 0.25 and JDK6

  7. Offirmo | November 2, 2011 at 4:45 pm | Permalink

    Excellent ! Just what I was looking for ! I didn’t even know this preseeding technique.
    Successfully applied this pre-seeding technique for java6 / ubuntu 10.04.
    Très bien !

  8. java assignment help | April 7, 2017 at 5:07 am | Permalink

    Excellent post for students who are learning Java.

  9. GoAssignmentHelp | June 22, 2017 at 6:19 am | Permalink

    Thanks a lot for sharing it, that’s truly has added a lot to our knowledge about this topic. Have a more successful day.

  10. Java help | July 17, 2017 at 8:25 am | Permalink

    `

  11. Make My Assignment | July 22, 2017 at 11:14 am | Permalink

    Great site and a great topic as well I really get amazed to read this. It’s really good. I like viewing web sites which comprehend the price of delivering the excellent useful resource free of charge.

  12. bloons tower defense | August 8, 2017 at 12:25 pm | Permalink

    I don’t know who you are. Don’t even know your name I wish we could talk but I don’t have a number to call.

  13. Case Study Assignmen | November 24, 2017 at 2:58 am | Permalink

    Information news shared by the author. Keep it up

  14. Case Study Assignmen | November 24, 2017 at 2:59 am | Permalink

    Information news shared by the author best of luck Dear..!!

  15. Case Study online he | November 24, 2017 at 3:25 am | Permalink

    Please keep us informed like this.

  16. assignment reviews | January 17, 2018 at 12:44 am | Permalink

    Hi, myself Lui Jones professional research writer. Our aim is to provide the reviews of the assignment websites for the students.

  17. assignment reviews | January 17, 2018 at 12:45 am | Permalink

    I am glad that you visited this website. It is easy to understand and designed in a proper way. We are web portal where you can review and write assignment related websites.

  18. Academic Help UK | January 30, 2018 at 1:45 am | Permalink

    There are many techniques which can get the job done and there are also many libraries in the JavaScript through which it can be done easily.

  19. College Essay Help U | February 24, 2018 at 12:29 am | Permalink

    There are numerous strategies which can take care of business and there are additionally numerous libraries in the JavaScript through which it should be possible effectively.

  20. College Essay Help UK | February 24, 2018 at 12:32 am | Permalink

    There are various methodologies which can get it done and there are also various libraries in the JavaScript through which it ought to be conceivable adequately.

  21. Best Essay Writer | February 26, 2018 at 4:05 am | Permalink

    I am happy that you went by this site. It is straightforward and planned appropriately. We are web-based interface where you can survey and compose task related sites.

  22. Assignment help | February 27, 2018 at 3:17 am | Permalink

    It is nice to read such high-quality content. It is a good article that discusses the topic at hand quite well. I am looking forward to read more articles from your site. Keep up the good work. Our assignment help experts could address students’ academic topics quite well. Thus, they can opt for our service if they have difficulty in writing the academic task. https://www.allassignmenthelp.com

  23. Essay Writers UK | March 13, 2018 at 12:59 am | Permalink

    There are many techniques that may get the process done and there are also many libraries within the JavaScript through which it is able to be done without problems.

  24. Michelle Johnson | March 15, 2018 at 4:33 pm | Permalink

    Well, as per my opinion java is something different than other programming languages. In your programme a couple of loops working and I’m sure those will run easily, but I’m not sure for this I believe to take Java Homework Help. With the support of expert, we can easily solve this. Thanks

  25. Evelyn W. Minnick | March 16, 2018 at 5:04 am | Permalink

    I have seen so many problems with java programming and this is most and very important part of a computer science. Are you looking for computer science assignment help, you must consider online websites for your project help. Without expert I don’t think it’s easy to finish those kind of projects. Thanks

  26. Nancie L Beckett | March 16, 2018 at 5:08 am | Permalink

    If you are looking in for genuine computer science homework help that will benefit you in understanding the topic and performing well during the examination, university homework help is the right choice. We are a team of academic professions who believe in catering exceptional services to the students who are seeking for help. All you do is reach us and get your problems sorted.

  27. Christian Baker | March 16, 2018 at 5:15 am | Permalink

    How it’s possible to do computer science assignment without expert? If you think something like this, than there are something for you. Yes, An online websites for computer science, java, programming and more help available.

  28. Dot Net Assignment H | March 19, 2018 at 4:45 am | Permalink

    I appreciate this work amazing post for us I like it.

  29. Public Relations Ass | March 19, 2018 at 6:46 am | Permalink

    Thanx for sharing such useful post keep it up :)

  30. CFMP Exam Help | March 19, 2018 at 7:29 am | Permalink

    Things are very open and intensely clear explanation of issues. was truly information. Your website is very beneficial.

  31. Homework Help | March 19, 2018 at 9:19 am | Permalink

    I am just writing essay about microsoft office and I didnt hope that I could find such rare graphics and rare interesting information that your site provides. Also surprised that site remains active for so many years, thanks or the help Mike!=)

  32. Handyman Dubai | March 20, 2018 at 2:08 pm | Permalink

    thanks for the post.

  33. www.dge.tn.nic.in | March 21, 2018 at 4:15 am | Permalink

    TNBSE is mainly referred to as Tamil Nadu Board of Secondary Education and it was developed in the year of 1911. For your information, TNBSE is mainly trying to develop the learning and education system in the state of Tamil Nadu with the scheduled classes.

  34. 500 cool friv games | March 21, 2018 at 6:39 am | Permalink

    This is one more brilliant site page that has demonstrated me astonishing resources which fuses instructional activities and materials to the critical class of topic subject. So I propose you before long experience these awesome advantages for get the hang of something which is astoundingly useful for everyone out there. Thanks!

  35. Makanan Yang Sehat U | April 11, 2018 at 2:50 am | Permalink

    Makanan Yang Sehat Untuk Penderita Penyakit Hipertiroid
    http://www.jagonyaobatherbal.com/2018/04/11/makanan-yang-sehat-untuk-penderita-penyakit-hipertiroid/
    Makanan Yang Sehat Untuk Penderita Penyakit Hipertiroid – Brokoli, Makanan yang mengandung Vit D, Produk Susu, Minum Teh Hijau, dan Berry.

  36. five nights at fredd | April 12, 2018 at 9:42 pm | Permalink

    Thank you for this wonderful Article!

  37. Cheap Essay Writing Service UK | April 18, 2018 at 7:20 am | Permalink

    I do watch this post to be to a great degree fascinating, steady and valuable. I have to surrender this is a post that has been incredibly richly created, and for without question, I may come back to for more information.

  38. Cheap Essay Writing Service UK | April 20, 2018 at 12:21 am | Permalink

    I do watch this post to be to an extraordinary degree interesting, consistent and profitable. I need to surrender this is a post that has been unbelievably lavishly made, and for beyond a shadow of a doubt, I may return for more data.

  39. Cheap Essay Writing Service | April 20, 2018 at 12:23 am | Permalink

    I do watch this post to be to an exceptional degree intriguing, reliable and beneficial. I have to surrender this is a post that has been incredibly sumptuously made, and for without question, I may come back to for more information.

  40. I do watch this post to be to an excellent degree interesting, dependable and advantageous. I need to surrender this is a post that has been unimaginably luxuriously made, and for undeniably, I may return to for more data.

  41. Best Essay Writing Services | April 28, 2018 at 12:00 am | Permalink

    This is one extra outstanding website page that has proven me superb resources which fuses educational sports and materials to the vital magnificence of subject matter challenge.

  42. Handyman Dubai | April 30, 2018 at 2:30 am | Permalink

    Such an educational civil argument for me I have taken an excessive number of focal points and information in this discussion. Which will truly help me in my future.

  43. Custom Essay Writing Service UK | May 8, 2018 at 1:50 am | Permalink

    Thanks loads for sharing it, that’s in reality has brought plenty to our knowledge approximately this subject matter. Have a greater a hit day.

  44. Online Essay Help UK | May 10, 2018 at 4:40 am | Permalink

    It may generate an error with this code but according to puppet documentation the following code may work you can give it a chance, connect_selections (msi, openbsd, rpm).

  45. Charlie225 | May 11, 2018 at 5:53 am | Permalink

    There square measure several techniques that will get the method done and there are several libraries at intervals the JavaScript through that it’s able to be kept away from issues. dissertation abstract in UK

  46. Charlie225 | May 11, 2018 at 5:55 am | Permalink

    Update: Paddy Weinstein of Seeking Alpha precedes his outline of it absolutely was everybody within Sun, and everyone our supporters within the market.java.net: 5 Habits of extremely Profitable computer code Developers our work below the inventive Commons Attribution-ShareAlike license. the one issue PFF and that i agree on evidently. dissertation abstract in UK

  47. criminal justice ess | May 18, 2018 at 8:35 am | Permalink

    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

  48. criminaljusticeess | May 18, 2018 at 8:36 am | Permalink

    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 https://bestwritinghelp.org/articles/buy-criminal-justice-essay/

  49. mobil ekspertiz | May 20, 2018 at 9:11 am | Permalink

    Test sonuçları size 4 sayfa halinde taranarak online olarak iletilir ve siz aracın başına gitmeden araç hakkında bilgi sahibi olursunuz
    En büyük referansımız müşterilerimizdir. Yapılan tüm ekspertiz çalışmaları sonunda sizlere imzalı ve kaşeli olarak sonuç raporu sunulmaktadır.

{ 1 } Trackback

  1. IT-Consulting Hempel | June 25, 2011 at 9:59 am | Permalink

    Ubuntu – Sun Java6 mit Puppet installieren…

    Ich bin gerade dabei die Installation einer Arbeitsstation / Notebooks mittels Puppet zu automatisieren. Ziel ist es nach der Installation der Grundversion von Ubuntu 10.10 mittels Puppet die Installation weiter Software sowie die Grundkonfiguration zu…

Post a Comment

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