Livro Devops na Pratica [ capitulo 7 pag 173/174]

Ao tentar instalar o rubygems e fpm com a configuração abaixo na maquina ci.pp da erro de versão. Segue.

class loja_virtual::ci {
include loja_virtual

package { [‘git’, ‘maven2’, ‘openjdk-6-jdk’, ‘rubygems’]:
ensure => “installed”,
}

package { ‘fpm’:
ensure => “installed”,
provider => ‘gem’,
require => Package[‘rubygems’],
}

Saída

==> ci: Installing Puppet modules in “librarian” with Librarian-Puppet…
==> ci: Running provisioner: puppet…
==> ci: Running Puppet with ci.pp…
==> ci: stdin: is not a tty
==> ci: warning: Could not retrieve fact fqdn
==> ci: err: /Stage[main]/Apache/Concat[/etc/apache2/ports.conf]/Concat_file[/etc/apache2/ports.conf]: Failed to generate additional resources using ‘generate’: Invalid parameter show_diff
==> ci: notice: /Stage[main]/Apt::Update/Exec[apt_update]/returns: executed successfully
==> ci: notice: /Stage[main]/Loja_virtual::Ci/Package[rubygems]/ensure: created
==> ci: err: /Stage[main]/Loja_virtual::Ci/Package[fpm]/ensure: change from absent to present failed: Execution of ‘/usr/bin/gem install --include-dependencies --no-rdoc --no-ri fpm’ returned 1: ERROR: Error installing fpm:
==> ci: ruby-xz requires Ruby version >= 1.9.3.
==> ci: INFO: gem install -y is now default and will be removed
==> ci: INFO: use --ignore-dependencies to install only the gems you list
==> ci:
==> ci: err: /Stage[main]/Apache/Concat[/etc/apache2/ports.conf]/Concat_file[/etc/apache2/ports.conf]: Failed to generate additional resources using ‘eval_generate: undefined method `[]=’ for nil:NilClass
==> ci: notice: Finished catalog run in 65.80 seconds

Poderia verificar como resolvo ?