我的人偶配置有问题。当我们运行 puppet 时,它会在放置 www.conf 文件之前启动 php5-fpm 服务。然后我必须登录并重新启动服务,以使所有人都能按预期运行。
这是我试图对 php/manifests/init.pp 文件执行的操作:
file { 'www.conf':
path => '/etc/php5/fpm/pool.d/www.conf',
ensure => file,
owner => root,
group => root,
source => 'puppet:///modules/php/www.conf',
require => Package['php5-fpm'],
}
service { 'php5-fpm':
ensure => running,
enable => true,
require => File['php.ini','www.conf'],
}
这是木偶输出:
notice: /Stage[first]/Apt_get::Update/Exec[apt-get update]/returns: executed successfully
notice: /Stage[second]/Tools/Package[python-software-properties]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[second]/Tools/Package[imagemagick]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[second]/Tools/Package[curl]/ensure: ensure changed 'purged' to 'present'
notice: /Stage[third]/Php/Exec[add_repo]/returns: executed successfully
notice: /Stage[third]/Php/Exec[update_repo]/returns: executed successfully
notice: /Stage[third]/Php/Package[php5-mysql]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php-apc]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php5-mcrypt]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php5-xdebug]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php5]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Service[apache2]/ensure: ensure changed 'running' to 'stopped'
notice: /Stage[third]/Php/Package[php5-fpm]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/File[php.ini]/content: content changed '{md5}a199da053cb070fcd15210120e49cd20' to '{md5}9291336844ec35b4b45a84e16975a321'
notice: /Stage[third]/Php/Package[php-pear]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php-xml-parser]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/Package[php5-curl]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php/File[browscap.ini]/ensure: defined content as '{md5}1393b32a89ea6af06e8e419ac4d4944d'
notice: /Stage[third]/Php/File[www.conf]/content: content changed '{md5}7f7f6459440a5944275303d06866cec2' to '{md5}68cd4723a3549ce1a81959a0fb104ff3'
notice: /Stage[third]/Php::Pear/Exec[pear-update-channel]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-upgrade]/returns: executed successfully
notice: /Stage[third]/Php/Package[libssh2-1-dev]/ensure: ensure changed 'purged' to 'latest'
notice: /Stage[third]/Php::Pear/Exec[pear-config-set]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-channel-discover-pear-phpunit-de]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-channel-discover-components-ez-no]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-channel-discover-pear-symfony-project-com]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-clear-cache]/returns: executed successfully
notice: /Stage[third]/Php::Pear/Exec[pear-install]/returns: executed successfully