Installing RT4 with preseed on Ubuntu 12.4

143 views
Skip to first unread message

robc

unread,
May 18, 2012, 2:41:55 AM5/18/12
to puppet...@googlegroups.com
Hi All,

I'm trying use use puppet in masterless mode to automate the setup of an RT4 server.


I set up RT4 manually, dumped the debconf keys into a preseed file, rolled back the VM snapshot and tried to apply the manifest.

The apply failed with a bunch of errors from debconf-set-selections about missing questions from the debconf db. Which suggested to me that the debconf-set-selections was being done on an uninstalled package.

Sure enough, installing RT via apt, uninstalling (without purging) and re-running the manifest succeeded. The bits that set up MySQL and its root password work fine, but that package was selected at install time.

Is this a problem with the "responsefile" attribute of the apt package provider? Or am I doing something wrong? TBH, I haven't done much with automating Debian/Ubuntu installs before now, so I wouldn't be surprised if I'm completely missing the point with debconf.

The relevant bit of my manifest looks like this:

define preseed_package ( $ensure ) {
  file { "/root/puppet/preseeds/$name.preseed":
    mode => 600,
    backup => false,
  }
  package { "$name":
    ensure => $ensure,
    responsefile => "/root/puppet/preseeds/$name.preseed",
    require => File["/root/puppet/preseeds/$name.preseed"],
  }
}

package { "apache2":  ensure => present }
preseed_package { "mysql-server":  ensure => present }
package { "mysql-client":  ensure => present }
# Don't want the default sqlite3 backend for RT
package { "rt4-db-mysql":
  ensure => present,
  before => Preseed_package["request-tracker4"]
}

preseed_package { "request-tracker4": ensure => present }
service { "mysql":
  ensure => running,
  enable => true,
  require => Preseed_package["mysql-server"],
}

TIA,
rob
Reply all
Reply to author
Forward
0 new messages