我试图通过傀儡自动化的设置。 我遵循这里描述的方法,这为我几个包工作,但为了进出口我有一个问题:一个select没有正确应用在一个新的系统。
在设置exim或运行dpkg-reconfigure exim4-config ,我select了如下面截图所示的smarthost选项 
将select导出到文件导致以下(剥去一些部分)
$ debconf-get-selections | grep exim exim4-config exim4/dc_other_hostnames string my.other.hostname exim4-config exim4/dc_eximconfig_configtype select mail sent by smarthost; received via SMTP or fetchmail exim4-config exim4/no_config boolean true exim4-config exim4/hide_mailname boolean true exim4-config exim4/dc_postmaster string exim4-config exim4/dc_smarthost string my.smarthost.com::port exim4-config exim4/dc_relay_domains string exim4-config exim4/dc_relay_nets string exim4-base exim4/purge_spool boolean false exim4-config exim4/mailname string my.mail.name
正如你所看到的,所有的选项看起来都很好。 请注意, dc_eximconfig_configtype (输出的第2行)显示交互式configuration中所选值的文本。
当试图在我的木偶configuration中使用此导出时,该参数没有正确应用:
package { "exim4": responsefile => my-exported-exim4-debconf, ensure => installed; }
我也尝试通过debconf-get-selections来导入configuration,我认为puppet在这种情况下是在debian环境中进行的,但是似乎没有提供任何指示就忽略它。
这是一个已知的错误? 你知道我怎样才能解决这个问题,不同的configuration导出(例如提供一个整数索引的参数),或者build议一个替代的发布configuration与傀儡的exim?
谢谢
Kariem
由于exim安装不提供configuration选项,只是默认为本地模式,这可能是为什么选项正在设置。
无论如何,一个不错的select是使用dpkg-reconfigure ,让puppetconfiguration文件/etc/exim4/update-exim4.conf.conf然后运行命令update-exim4.conf 。
在运行dpkgconfiguration一次之后,文件将会有选项设置,以供您参考puppet的主副本,您可能需要在puppet中使用模板,因为在文件中也有主机名。
您应该能够在本地macros文件中定义configurationtypes和智能主机。 对于分割configuration,这将是/etc/exim4/conf.d/main/00_local_macros ,对于模板化configuration则是/etc/exim4/conf.d/main/00_local_macros 。
variables应该是DC_eximconfig_configtype , DC_eximconfig_satellite和DC_smarthost 。 请参阅/var/lib/exim4/config.autogenerated dynamically by /usr/sbin/update-exim4.conf部分。