Hi All,

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

I've used the example preseed define from 
http://projects.puppetlabs.com/projects/1/wiki/Debian_Preseed_Patterns.

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

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/J8iEPltN3hAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to