Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

modifications to pip and ruby and apache module

  • Loading branch information...
commit a90d822015f82fae65a1eded8586e71b0b96d6df 1 parent 48e41db
@aventurella authored
View
5 manifests/base.pp
@@ -16,8 +16,9 @@
#aventurella-python::profile::pip{'profile-pip':}
#aventurella-python::profile::virtualenv{'default':}
-aventurella-apache2::module {'rewrite':
- enable => true
+aventurella-apache2::module {'enable_apache_modules':
+ modules => ['rewrite', 'ssl'],
+ enable => true,
}
aventurella-apache2::vhost {'vizio':
View
32 modules/aventurella-apache2/manifests/module.pp
@@ -1,25 +1,33 @@
define aventurella-apache2::module(
- $enable = true
- ) {
+ $modules,
+ $enable = false,
+){
include aventurella-apache2
+ aventurella-apache2::module_action{ $modules:
+ enable => $enable
+ }
+}
- if $enable{
+define aventurella-apache2::module_action(
+ $enable = false
+){
+ if $enable {
- exec{"apache_module_${title}":
- command => "/usr/sbin/a2enmod ${title}",
- unless => "/usr/sbin/apachectl -M | grep ${title}_module -i",
+ exec{"apache_module_enable_${name}":
+ command => "/usr/sbin/a2enmod ${name}",
+ unless => "/usr/sbin/apachectl -M | grep ${name}_module -i",
require => Package['apache2'],
notify => Service['apache2'],
}
- }
- else
- {
- exec{"apache_module_${title}":
- command => "/usr/sbin/a2dismod ${title}",
- onlyif => "/usr/sbin/apachectl -M | grep ${title}_module -i",
+
+ } else {
+ exec{"apache_module_disable_${name}":
+ command => "/usr/sbin/a2dismod ${name}",
+ onlyif => "/usr/sbin/apachectl -M | grep ${name}_module -i",
require => Package['apache2'],
notify => Service['apache2'],
}
}
+
}
View
11 modules/aventurella-python/manifests/pip.pp
@@ -1,16 +1,19 @@
define aventurella-python::pip(
$packages,
- $virtual_env = false,
+ $virtual_env = false,
+ $owner = $id
) {
include aventurella-python
aventurell-python::pip_action{ $packages:
- virtual_env => $virtual_env
+ virtual_env => $virtual_env,
+ owner => $owner
}
}
define aventurell-python::pip_action(
- $virtual_env = false
+ $virtual_env = false,
+ $owner
){
if $virtual_env {
$pip = "/home/vagrant/.virtualenvs/${virtual_env}/bin/pip"
@@ -18,7 +21,7 @@
exec { $name:
command => "${pip} install ${name}",
require => Aventurella-python::Virtualenv[$virtual_env],
- user => 'vagrant',
+ user => $owner,
unless => "${pip} freeze | grep ${name} -i",
}
View
5 modules/aventurella-ruby/manifests/gem.pp
@@ -3,9 +3,8 @@
include aventurella-ruby
- exec {"gem install ${title}":
- path => ['/usr/bin', '/bin'],
+ exec {"/usr/bin/gem install ${title}":
require => Package['rubygems'],
- unless => "gem list | grep ${title} -i",
+ unless => "/usr/bin/gem list | grep ${title} -i",
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.