[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r42: Add virtualenv and pip.

Jeff Licquia licquia at linuxfoundation.org
Tue Jan 24 18:26:47 UTC 2012


------------------------------------------------------------
revno: 42
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Tue 2012-01-24 13:26:47 -0500
message:
  Add virtualenv and pip.
added:
  modules/python/
  modules/python/init.pp
  modules/python/manifests/
  modules/python/virtualenv.pp
modified:
  manifests/nodes/lsb1.pp
-------------- next part --------------
=== modified file 'manifests/nodes/lsb1.pp'
--- a/manifests/nodes/lsb1.pp	2012-01-22 22:09:53 +0000
+++ b/manifests/nodes/lsb1.pp	2012-01-24 18:26:47 +0000
@@ -10,4 +10,6 @@
 
     include mail::postfix
 
+    include python::virtualenv
+
 }

=== added directory 'modules/python'
=== added file 'modules/python/init.pp'
--- a/modules/python/init.pp	1970-01-01 00:00:00 +0000
+++ b/modules/python/init.pp	2012-01-24 18:26:47 +0000
@@ -0,0 +1,7 @@
+class python {
+
+    package {
+        'python': ensure => present;
+    }
+
+}

=== added directory 'modules/python/manifests'
=== added file 'modules/python/virtualenv.pp'
--- a/modules/python/virtualenv.pp	1970-01-01 00:00:00 +0000
+++ b/modules/python/virtualenv.pp	2012-01-24 18:26:47 +0000
@@ -0,0 +1,24 @@
+class python::virtualenv inherits python {
+
+    package {
+        'python-virtualenv': ensure => present,
+        'python-pip':        ensure => present,
+    }
+
+    # These packages aren't available in SLES 11, so we'll need
+    # to add the repos first.
+
+    $skipsles11obs = "$operatingsystem-$operatingsystemrelease" ? {
+        /^SLES-11(\.[0-9])?$/ => false,
+        default               => true,
+    }
+
+    exec { 'add-python-zypper-repo':
+        command     => 'zypper addrepo -f http://download.opensuse.org/repositories/devel:/languages:/python/SLE_11/devel:languages:python.repo && zypper --gpg-auto-import-keys refresh',
+        path        => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
+        refreshonly => true,
+        logoutput   => true,
+        noop        => $skipsles11obs,
+    }
+
+}



More information about the lsb-messages mailing list