我正在嘗試在我的Vagrant機器上獲得對augeas的支持。Augeas支持我的Vagrant機器?
我想這些指令安裝一些軟件包:
package { "augeas-tools": ensure => installed }
package { "libaugeas-dev": ensure => installed }
package { "libaugeas-ruby": ensure => installed }
當我嘗試在我的艙單使用augeas,VM啓動後,我收到此錯誤:
err: Could not find a suitable provider for augeas
我使用Vagrant 1.0.3的精確32官方包裝盒。
流浪1.0.3有紅寶石1.8.7和2.7.14傀儡
$ ruby -v
$ ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
$ puppet help
$ Puppet v2.7.14
這是我與PHP類的小清單,包括後阿帕奇類,MySQL的和其它類測試分別。 除了augeas命令,所有的東西都能正常工作。
class php {
exec { "apt-update":
command => "/usr/bin/apt-get update",
refreshonly => true;
}
package { "augeas-tools": ensure => installed }
package { "libaugeas-dev": ensure => installed }
package { "libaugeas-ruby": ensure => installed }
package { "php5": ensure => installed }
package { "php5-cli": ensure => installed }
package { "php5-xdebug": ensure => installed }
package { "php5-curl": ensure => installed }
package { "php5-intl": ensure => installed }
package { "php5-imap": ensure => installed }
package { "php5-mcrypt": ensure => installed }
package { "php5-imagick": ensure => installed }
package { "php5-sqlite": ensure => installed }
package { "php5-gd": ensure => installed }
package { "php-apc": ensure => installed }
package {
"libapache2-mod-php5" :
ensure => installed,
require => Package["php5"]
}
augeas { "php-cli":
require => [
Package["php5"],
Package["augeas-tools"],
Package["libaugeas-dev"],
Package["libaugeas-ruby"],
],
context => "/etc/php5/cli/php.ini",
changes => [
"set date.timezone Europe/Rome",
"set short_open_tag Off",
];
}
augeas { "php-apache":
require => [
Package["php5"],
Package["augeas-tools"],
Package["libaugeas-dev"],
Package["libaugeas-ruby"],
],
context => "/etc/php5/apache2/php.ini",
changes => [
"set date.timezone Europe/Rome",
"set short_open_tag Off",
];
}
}
安裝包之後,在流浪的機器記錄與 「無業遊民SSH」,我啓動:
[email protected]:~$ ruby -raugeas -e "puts Augeas.open"
#<Augeas:0xb77a3598>
提前感謝!
您使用的是哪個版本的puppet,您的puppet代碼是什麼樣的? –
我添加了您請求的信息。我希望這可以幫助... –