puppet-python icon indicating copy to clipboard operation
puppet-python copied to clipboard

Amazon Linux isn't quite RedHat

Open gozer opened this issue 10 years ago • 2 comments
trafficstars

Trying to use this module on Amazon Linux doesn't quite work, unfortunately.

class { 'python':
  version => 'system',
  pip     => true,
  dev     => true,
}

Yields:

$> puppet apply python.pp 
[...]
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-pip' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Python::Install/Package[python-pip]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-pip' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-devel' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Python::Install/Package[python-devel]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list python-devel' returned 1: Error: No matching Packages to list
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y list python' returned 1: Error: No matching Packages to list
Error: /Stage[main]/Python::Install/Package[python]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y list python' returned 1: Error: No matching Packages to list
Notice: /Stage[main]/Python/Anchor[python::end]: Dependency Package[python-pip] has failures: true
Notice: /Stage[main]/Python/Anchor[python::end]: Dependency Package[python-devel] has failures: true
Notice: /Stage[main]/Python/Anchor[python::end]: Dependency Package[python] has failures: true
Warning: /Stage[main]/Python/Anchor[python::end]: Skipping because of failed dependencies

And the issue seems to come from the fact that on Amazon Linux, there is no 'python-devel' package, only packages like:

  • python26-devel
  • python27-devel
  • python34-devel

With the python27* variants being the current default on Amazon Linux @ 2015.03

gozer avatar Aug 11 '15 02:08 gozer

Is there a workaround for this? I'm trying to get the module working with Amazon's python27 packages.

danieljamesscott avatar May 04 '16 13:05 danieljamesscott

Add this to your site.pp (where you define which classes to include):

  Package {
    allow_virtual => true,
  }

alexpekurovsky avatar Sep 06 '16 15:09 alexpekurovsky