Paul, have you seen http://projects.puppetlabs.com/issues/2349 ?
If more people watch that, I'm more likely to prioritize doing that :) Alternative suggestions welcome. On Thu, Aug 12, 2010 at 10:35 AM, Paul Hamby <[email protected]> wrote: > We created a definition in our "apt" module called preseed_package and > then we call > > apt::preseed_package { <package_name>: > > ensure => present, > > } > > > You can then create a preseed file for that package and have puppet > put it on the host. > > From our "apt" module: > define preseed_package ( $ensure ) { > > > > file { "/var/local/preseed": > > ensure => directory, > > } > > > > file { "/var/local/preseed/$name.preseed": > > source => "puppet:///apt/preseed/$name.preseed", > > mode => 600, > > backup => false, > > } > > > > package { "$name": > > ensure => $ensure, > > responsefile => "/var/local/preseed/$name.preseed", > > require => File["/var/local/preseed/$name.preseed"], > > } > > > > } > > > > Paul > > On Aug 10, 5:20 am, Craig Box <[email protected]> wrote: >> I have been trying to use Puppet to install the Zabbix server, which uses >> dbconfig-common to set up its database. >> >> If you don't do anything more than package { "zabbix-server-mysql": ensure >> => installed }, then you end up with errors that look much like this >> (snipped for brevity) : >> >> err: //zabbix::server/Package[zabbix-server-mysql]/ensure: change from >> purged to present failed: Execution of '/usr/bin/apt-get -q -y -o >> DPkg::Options::=--force-confold install zabbix-server-mysql' returned 100: >> Reading package lists... >> Building dependency tree... >> Reading state information... >> >> Preconfiguring packages ... >> .: 3: Can't open /usr/share/dbconfig-common/dpkg/config.mysql >> zabbix-server-mysql failed to preconfigure, with exit status 2 >> Fetched 5659kB in 0s (9017kB/s) >> >> Setting up zabbix-server-mysql (1:1.8.1-1ubuntu1) ... >> dbconfig-common: writing config to >> /etc/dbconfig-common/zabbix-server-mysql.conf >> >> Creating config file /etc/dbconfig-common/zabbix-server-mysql.conf with new >> version >> >> Creating config file /etc/zabbix/zabbix_server.conf with new version >> ERROR 2002 (HY000): Can't connect to local MySQL server through socket >> '/var/run/mysqld/mysqld.sock' (2). >> unable to connect to mysql server. >> error encountered creating user: >> ERROR 2002 (HY000): Can't connect to local MySQL server through socket >> '/var/run/mysqld/mysqld.sock' (2) >> dbconfig-common: zabbix-server-mysql configure: aborted. >> dbconfig-common: flushing administrative password >> dpkg: error processing zabbix-server-mysql (--configure): >> subprocess installed post-installation script returned error exit status 1 >> Errors were encountered while processing: >> zabbix-server-mysql >> E: Sub-process /usr/bin/dpkg returned an error code (1) >> >> In short, it's expecting that you have answered questions about its MySQL >> root password. >> >> If you install the package manually, the first question you are asked is >> whether or not you want to use dbconfig-common, and a warning that if you >> already have a database set up, you don't want to use it. It seem to >> influence the value for the dbconfig-install key. Therefore, it stands to >> reason that if I preseed this key: >> >> zabbix-server-mysql zabbix-server-mysql/dbconfig-install boolean false >> >> then I should get what I want. However, I don't - still prompted, still >> fails to install silently, etc. >> >> As this question probably comes up a lot for people installing software >> through Puppet, has anyone come up with a satisfactory solution to tell >> debconf/dbconfig-common to just get out of the way entirely? >> >> Craig > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > > -- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
