1

I would like to install a package (CouchDB 2.1) without having to manually respond to the prompt. I believe that preseeding debconf is the way this is done.

The debconf manual () says this:

The easiest way to set up the database is to install the packages on one machine and answer their questions as usual

So after installing the package on one node, I looked at /var/cache/debconf/config.dat and I see the following has been added:

Name: couchdb/adminpass_mismatch
Template: couchdb/adminpass_mismatch
Owners: couchdb

Name: couchdb/bindaddress
Template: couchdb/bindaddress
Value: 0.0.0.0
Owners: couchdb
Flags: seen

Name: couchdb/cookie
Template: couchdb/cookie
Value: monster
Owners: couchdb
Flags: seen

Name: couchdb/error_setting_password
Template: couchdb/error_setting_password
Owners: couchdb

Name: couchdb/have_1x_databases
Template: couchdb/have_1x_databases
Owners: couchdb

Name: couchdb/mode
Template: couchdb/mode
Value: clustered
Owners: couchdb
Flags: seen

Name: couchdb/nodename
Template: couchdb/nodename
Value: [email protected]
Owners: couchdb
Flags: seen

And similarly a couple of 'verses'? where added to the passwords.dat file

Should I just append this to /var/cache/debconf/config.dat on the other machines? Or, how can I use the info in this database to install without prompts on future machines?

Also, I see that the password fields have been similarly added to passwords.dat. can I just append those as well? (They are not sensitive since they can be changed very easily)

2
  • 1
    Actually the answer really is as simple as copying the lines to files on other servers. But I'll leave this up because it took me a while to figure this out and maybe it can help someone else
    – Zach Smith
    Commented Aug 23, 2017 at 8:51
  • 1
    Of course it may help someone else. You can even answer to your own question and accept the answer, this would be even better.
    – xhienne
    Commented Aug 23, 2017 at 9:26

1 Answer 1

1

It seems that just appending the new lines to config.dat and passwords.dat works for future installs.

So:

  1. Install a package normally
  2. Figure out what was added to the config.dat and passwords.dat files (I diffed the before and after .dat files)
  3. Append the lines created by your package installation to the .dat files on other server nodes

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .