Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

package { 'php': } in init.pp breaks apt-get on Ubuntu if install_options is left blank #87

Open
jwbraucher opened this issue Mar 13, 2015 · 1 comment

Comments

@jwbraucher
Copy link

Hello - great module, by the way.

I've been testing a deployment on an Ubuntu 14.04 system using the latest commit of this module (March, 2015) and I keep encountering the same error when the module tries to install php5. The error is :

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold  install php5' returned 100: E: Invalid operation

I've discovered that this is caused by passing an empty value to 'install_options' in the package declaration for php in site.pp (the default behavior):

 ### Managed resources
package { 'php':
ensure => $php::manage_package,
name => $php::package,
install_options => $php::install_options,
}

This passes an invalid null argument to 'apt-get install'. I've worked around this by passing "-y" in to the install_options parameter. I'm not sure what the correct solution is, but it would appear that at least on Ubuntu 14.04 the install_options parameter does not work with an empty value.

@alvagante
Copy link
Member

good points, ty,
this should be managed in the params class, pr welcomed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants