我正在使用 Vagrant 和 Puppet 在 Ubuntu 上安装 Apache 和 PHP。但是我在vagrant up
. 我认为模板的路径是正确的,那么为什么会出错?
我正在使用此处修改的设置以确保apt-get update
在其他任何事情之前运行
错误
←[1;35merr: /Stage[main]/Php/File[/etc/php5/apache2/apc.ini]/ensure: change from
absent to present failed: Could not set 'present on ensure: No such file or dir
ectory - /etc/php5/apache2/apc.ini.puppettmp_6187 at /tmp/vagrant-puppet/modules
-0/php/manifests/init.pp:44←[0m
←[1;35merr: /Stage[main]/Php/File[/etc/php5/apache2/php.ini]/ensure: change from
absent to present failed: Could not set 'present on ensure: No such file or dir
ectory - /etc/php5/apache2/php.ini.puppettmp_6687 at /tmp/vagrant-puppet/modules
-0/php/manifests/init.pp:36←[0m
/modules/php/manifests/init.pp
file { "/etc/php5/apache2/php.ini":
ensure => present,
mode => 644,
content => template("php/etc/php5/conf.d/php.ini.erb"),
require => Package["php5"],
notify => Service["apache"];
}
file { "/etc/php5/apache2/apc.ini":
ensure => present,
mode => 644,
content => template("php/etc/php5/conf.d/apc.ini.erb"),
require => [ Package["php5"], Package["php-apc"], Package["apache"] ],
notify => Service["apache"];
}
模板
- /modules/php/templates/etc/php5/conf.d/apc.ini.erb
- /modules/php/templates/etc/php5/conf.d/php.ini.erb