Solucionado (ver solução)
Solucionado
(ver solução)
2
respostas

puppet error

Como resolver esse erro;

vagrant@ubuntu-bionic:~$ sudo puppet apply /vagrant/configs/manifests/phpweb.pp Error: Could not parse for environment production: Syntax error at '=>' (file: /vagrant/configs/manifests/phpweb.pp, line: 14, column: 10) on node ubuntu-bionic

2 respostas
solução!

Corregido o arquivo phpweb.pp com as informações abaixo:

# execute 'apt-get update'
exec { 'apt-update':
    command => '/usr/bin/apt-get update' 
}

package { ['php7.2' ,'php7.2-mysql'] :
    require => Exec['apt-update'],
    ensure => installed,
}

exec { 'run-php7':
    require => Package['php7.2'],
    command => '/usr/bin/php -S localhost:80 -t /vagrant/src &'
}

Resolvido:

Notice: /Stage[main]/Main/Exec[apt-update]/returns: executed successfully ^[[FNotice: /Stage[main]/Main/Package[php7.2]/ensure: created Notice: /Stage[main]/Main/Package[php7.2-mysql]/ensure: created Notice: /Stage[main]/Main/Exec[run-php7]/returns: executed successfully

Poderia me ajudar a solucionar este erro ?

vagrant@ubuntu-groovy:/vagrant/configs/manifests$ sudo puppet apply /vagrant/configs/manifests/phpweb.pp /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:315: warning: deprecated Object#=~ is called on Puppet::Transaction::Report; it always returns nil /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete Notice: Compiled catalog for ubuntu-groovy in environment production in 0.16 seconds /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:461: warning: URI.escape is obsolete /usr/lib/ruby/vendor_ruby/puppet/util.rb:315: warning: deprecated Object#=~ is called on Puppet::Transaction::Report; it always returns nil Notice: /Stage[main]/Main/Exec[apt-update]/returns: executed successfully Notice: /Stage[main]/Main/Package[php7.2]/ensure: created Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php7.2-mysql' returned 100: Reading package lists... Building dependency tree...Reading state information...E: Unable to locate package php7.2-mysqlE: Couldn't find any package by glob 'php7.2-mysql'E: Couldn't find any package by regex 'php7.2-mysql'Error: /Stage[main]/Main/Package[php7.2-mysql]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install php7.2-mysql' returned 100: Reading package lists...Building dependency tree...Reading state information...E: Unable to locate package php7.2-mysqlE: Couldn't find any package by glob 'php7.2-mysql'E: Couldn't find any package by regex 'php7.2-mysql'Error: Could not find command '/usr/bin/php' Error: /Stage[main]/Main/Exec[run-php7]/returns: change from 'notrun' to ['0'] failed: Could not find command '/usr/bin/php' /usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: $SAFE will become a normal global variable in Ruby 3.0 Notice: Applied catalog in 3.64 seconds /usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: $SAFE will become a normal global variable in Ruby 3.0 /usr/lib/ruby/vendor_ruby/puppet/util.rb:315: warning: deprecated Object#=~ is called on Puppet::Transaction::Report; it always returns nil /usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: $SAFE will become a normal global variable in Ruby 3.0 /usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: $SAFE will become a normal global variable in Ruby 3.0