You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 11, 2019. It is now read-only.
I'm unable to install php version 5.6.19, using the following class definition, within my Centos 7x environment:
class { 'php':
version => '5.6.19',
}
Since I'm using puppet to provision my vagrant instance of centos 7x, I've reduced the above thought to the following configure_php.pp definition:
# variables$working_dir = '/home/provisioner'## define $PATH for all execs
Exec {path => ['/usr/bin/', '/usr/sbin/']}
## update yum using the added EPEL repositoryclassupdate_yum {
exec { 'update-yum':
command => 'yum -y update',
timeout => 750,
}
}
## install phpclassinstall_php {
## set dependency
require update_yum
## install phpclass { 'php': }
}
## constructorclassconstructor {
## set dependency
contain update_yum
contain install_php
}
include constructor
When I run the above manifest, within my vagrant implementation:
[provisioner@drupal-demonstration ~]$ vagrant up
...
==> default: Running provisioner: puppet...
==> default: Running Puppet with environment development...
==> default: Error: Evaluation Error: Unknown function: 'params_lookup'. at /tmp
/vagrant-puppet/modules-3caf511b1ed192516806c35da44e64ef/php/manifests/init.pp:1
52:26 on node drupal-demonstration.com
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
In an attempt reduce the debug time, I implemented the same test, within the terminal console:
[provisioner@drupal-demonstration ~]$ cd~
[provisioner@drupal-demonstration ~]$ ls
[provisioner@drupal-demonstration ~]$ puppet module install example42-php
Notice: Preparing to install into /home/provisioner/.puppetlabs/etc/code/modules
...
Notice: Created target directory /home/provisioner/.puppetlabs/etc/code/modules
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/home/provisioner/.puppetlabs/etc/code/modules
└─┬ example42-php (v2.0.25)
└── example42-puppi (v2.1.12)
[provisioner@drupal-demonstration ~]$ sudo vi install_php.pp
[provisioner@drupal-demonstration ~]$ puppet apply install_php.pp
Warning: Config file /home/provisioner/.puppetlabs/etc/code/hiera.yaml not found
, using Hiera defaults
Notice: Compiled catalog fordrupal-demonstration.comin environment production
in 1.57 seconds
Error: Could not find dependent Service[httpd] for File[php.conf] at /home/provi
sioner/.puppetlabs/etc/code/modules/php/manifests/init.pp:258
However, I still was not able to install php 5.6.19, on centos 7x:
[root@drupal-demonstration provisioner]# puppet module install puppetlabs-apach
e
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppetlabs-apache (v1.8.1)
├── puppetlabs-concat (v2.1.0)
└── puppetlabs-stdlib (v4.11.0)
[root@drupal-demonstration provisioner]# puppet module install example42-puppi
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└── example42-puppi (v2.1.12)
[root@drupal-demonstration provisioner]# puppet module install example42-php
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/m
odules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ example42-php (v2.0.25)
└── example42-puppi (v2.1.12)
[root@drupal-demonstration provisioner]# puppet apply install_php.pp
Warning: Scope(Concat::Fragment[Apache ports header]): The $ensure parameter to
concat::fragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 443]): The $ensure parameter to concat::f
ragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 80]): The $ensure parameter to concat::fr
agment is deprecated and has no effect.
Notice: Compiled catalog fordrupal-demonstration.comin environment production
in 1.87 seconds
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.d/ssl.conf]/ensure: removed
Notice: /Stage[main]/Apache::Mod::Mime/File[mime.conf]/content: content changed
'{md5}82476f6d2e6819f5db88eba8395615d8' to '{md5}9da85e58f3bd6c780ce76db603b7f028'
Notice: /Stage[main]/Apache::Mod::Mime_magic/File[mime_magic.conf]/content: cont
ent changed '{md5}b9061a13b522d13d822ffacbb6119aab' to '{md5}b258529b332429e2ff8344f726a95457'
Notice: /Stage[main]/Apache::Mod::Alias/File[alias.conf]/content: content change
d '{md5}2f94b7abc6650a7c874bc4b2cf62dd42' to '{md5}983e865be85f5e0daaed7433db82995e'
Error: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install php-5.6.19'
returned 1: Error: Nothing to do
Error: /Stage[main]/Php/Package[php]/ensure: change from purged to 5.6.19 failed
: Could not update: Execution of '/bin/yum -d 0 -e 0 -y install php-5.6.19' retu
rned 1: Error: Nothing to do
Notice: /Stage[main]/Php/File[php.conf]: Dependency Package[php] has failures: t
rue
Warning: /Stage[main]/Php/File[php.conf]: Skipping because of failed dependencie
s
Notice: /Stage[main]/Apache::Mod::Php/File[php5.conf]/ensure: defined content as
'{md5}65c847fb8f6c4f2b6dab004589b90b52'
Notice: /Stage[main]/Apache::Mod::Headers/Apache::Mod[headers]/File[headers.load
]/ensure: defined content as '{md5}96094c96352002c43ada5bdf8650ff38'
Notice: /Stage[main]/Apache::Mod::Php/Apache::Mod[php5]/File[php5.load]/ensure:
defined content as '{md5}5aabed26d29e38135b5157acff80a2a6'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/owner
: owner changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/group
: group changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/Concat[25-localhost.conf]/Fi
le[/etc/httpd/conf.d/25-localhost.conf]/content: content changed '{md5}425602e35488b6d853b11d824241f23f' to '{md5}e692f2f6f6f48d986924d6ac477d21ad'
Notice: /Stage[main]/Apache::Mod::Ssl/File[ssl.conf]/content: content changed '{md5}e802ccccca845c4c7e1bf0764af57c8a' to '{md5}8884ea33793365e0784cfd43be72464e'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost_ssl]/Concat[25-localhost_ssl.
conf]/File[/etc/httpd/conf.d/25-localhost_ssl.conf]/content: content changed '{md5}6a87e769095cdccc5ac6eab0274302ac' to '{md5}7c2f9f4264a16ba442fb5d7e2f6f6edd'
Notice: /Stage[main]/Apache/Concat[/etc/httpd/conf/ports.conf]/File[/etc/httpd/c
onf/ports.conf]/content: content changed '{md5}334fa5cddbf9a408ea1ca7a1666b1fc4'
to '{md5}7c4742adc3e33066c74a24c77716ccce'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf/httpd.conf]/content: content ch
anged '{md5}b761a40cd0e61eef44a486e0143f9125' to '{md5}c737309f707b785cb7760b6d19f7520f'
Notice: /Stage[main]/Apache::Service/Service[httpd]: Dependency Package[php] has
failures: true
Warning: /Stage[main]/Apache::Service/Service[httpd]: Skipping because of failed
dependencies
Notice: Applied catalog in 1.58 seconds
[root@drupal-demonstration provisioner]# php -v
bash: php: command not found
[root@drupal-demonstration provisioner]# puppet apply install_php.pp
Warning: Scope(Concat::Fragment[Apache ports header]): The $ensure parameter to
concat::fragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 443]): The $ensure parameter to concat::f
ragment is deprecated and has no effect.
Warning: Scope(Concat::Fragment[Listen 80]): The $ensure parameter to concat::fr
agment is deprecated and has no effect.
Notice: Compiled catalog fordrupal-demonstration.comin environment production
in 1.87 seconds
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.d/ssl.conf]/ensure: removed
Notice: /Stage[main]/Apache::Mod::Mime/File[mime.conf]/content: content changed
'{md5}82476f6d2e6819f5db88eba8395615d8' to '{md5}9da85e58f3bd6c780ce76db603b7f028'
Notice: /Stage[main]/Apache::Mod::Mime_magic/File[mime_magic.conf]/content: cont
ent changed '{md5}b9061a13b522d13d822ffacbb6119aab' to '{md5}b258529b332429e2ff8344f726a95457'
Notice: /Stage[main]/Apache::Mod::Alias/File[alias.conf]/content: content change
d '{md5}2f94b7abc6650a7c874bc4b2cf62dd42' to '{md5}983e865be85f5e0daaed7433db82995e'
Notice: /Stage[main]/Php/Package[php]/ensure: created
Notice: /Stage[main]/Apache::Mod::Php/File[php5.conf]/ensure: defined content as
'{md5}65c847fb8f6c4f2b6dab004589b90b52'
Notice: /Stage[main]/Apache::Mod::Headers/Apache::Mod[headers]/File[headers.load
]/ensure: defined content as '{md5}96094c96352002c43ada5bdf8650ff38'
Notice: /Stage[main]/Apache::Mod::Php/Apache::Mod[php5]/File[php5.load]/ensure:
defined content as '{md5}5aabed26d29e38135b5157acff80a2a6'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/owner
: owner changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/File[/vagrant/webroot]/group
: group changed 'provisioner' to 'root'
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost]/Concat[25-localhost.conf]/Fi
le[/etc/httpd/conf.d/25-localhost.conf]/content: content changed '{md5}425602e35488b6d853b11d824241f23f' to '{md5}e692f2f6f6f48d986924d6ac477d21ad'
Notice: /Stage[main]/Apache::Mod::Ssl/File[ssl.conf]/content: content changed '{md5}e802ccccca845c4c7e1bf0764af57c8a' to '{md5}8884ea33793365e0784cfd43be72464e'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf.modules.d/10-php.conf]/ensure:
removed
Notice: /Stage[main]/Httpd/Apache::Vhost[localhost_ssl]/Concat[25-localhost_ssl.
conf]/File[/etc/httpd/conf.d/25-localhost_ssl.conf]/content: content changed '{md5}6a87e769095cdccc5ac6eab0274302ac' to '{md5}7c2f9f4264a16ba442fb5d7e2f6f6edd'
Notice: /Stage[main]/Apache/Concat[/etc/httpd/conf/ports.conf]/File[/etc/httpd/c
onf/ports.conf]/content: content changed '{md5}334fa5cddbf9a408ea1ca7a1666b1fc4'
to '{md5}7c4742adc3e33066c74a24c77716ccce'
Notice: /Stage[main]/Apache/File[/etc/httpd/conf/httpd.conf]/content: content ch
anged '{md5}b761a40cd0e61eef44a486e0143f9125' to '{md5}c737309f707b785cb7760b6d19f7520f'
Notice: /Stage[main]/Apache::Service/Service[httpd]: Triggered 'refresh' from 1
events
Notice: Applied catalog in 4.92 seconds
[root@drupal-demonstration provisioner]# php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
Although, no errors were present within the above traceback, the overall goal was to install php 5.6.19, not 5.4.16.
So, the version you specify must be available in your repos.
The executed command is /bin/yum -d 0 -e 0 -y install php-5.6.19, so I suppose that version is not actually available via yum.
@alvagante, should this repository have corresponding logic that attempts to download the corresponding packages, before installing them? Or, is that responsibility something that I must remediate?
Well the module doesn't go as far.
It supports installation only via native package managers and doesn't manage eventual additional repos.
So what you can do is to provide the repos you need in your wrapper class and then specify an existing version in the repo.
Activity
jeff1evesque commentedon Mar 25, 2016
Forgot to mention that I've already installed the example42/puppi dependency:
[provisioner@drupal-demonstration ~]$ puppet module install example42-puppi Notice: Preparing to install into /home/provisioner/.puppetlabs/etc/code/modules ... Notice: Module example42-puppi 2.1.12 is already installed.jeff1evesque commentedon Mar 25, 2016
To correspond to the earlier traceback error:
I adjusted the
install_php.pp:However, I still was not able to install php
5.6.19, on centos 7x:jeff1evesque commentedon Mar 25, 2016
I adjusted
install_php.pp, to not install a specific php version (5.6.19), and install the default version:which generates the following traceback:
Although, no errors were present within the above traceback, the overall goal was to install php
5.6.19, not5.4.16.alvagante commentedon Mar 29, 2016
So, the version you specify must be available in your repos.
The executed command is /bin/yum -d 0 -e 0 -y install php-5.6.19, so I suppose that version is not actually available via yum.
jeff1evesque commentedon Mar 30, 2016
@alvagante, should this repository have corresponding logic that attempts to download the corresponding packages, before installing them? Or, is that responsibility something that I must remediate?
alvagante commentedon Mar 30, 2016
Well the module doesn't go as far.
It supports installation only via native package managers and doesn't manage eventual additional repos.
So what you can do is to provide the repos you need in your wrapper class and then specify an existing version in the repo.