From 97b9ab10a6c81389ea09ea3a24a4d81cc002ff94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Tue, 17 Apr 2012 00:35:42 +0300 Subject: [PATCH] Initial version of python class which installs python. --- python/manifests/init.pp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/python/manifests/init.pp b/python/manifests/init.pp index 5a90d09..39e1e0b 100644 --- a/python/manifests/init.pp +++ b/python/manifests/init.pp @@ -1,3 +1,27 @@ + +# Install python +# +class python { + + package { "python": + ensure => installed, + notify => $operatingsystem ? { + "openbsd" => Exec["python-links"], + default => undef, + }, + } + + exec { "python-links": + path => "/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin", + command => "pkg_info python | egrep '^[ ]*ln -sf' | sh", + user => "root", + group => "wheel", + refreshonly => true, + } + +} + + # Install python software using setup.py. # # === Parameters