Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
reorganized pythonbrew using puppet standards
- Loading branch information
Showing
8 changed files
with
99 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,53 @@ | ||
# Class: pythonbrew | ||
# | ||
# This module manages pythonbrew python's. | ||
# | ||
# Parameters: | ||
# | ||
# There are no default parameters for this class. All module parameters are managed | ||
# via the nginx::params class | ||
# | ||
# Actions: | ||
# | ||
# Requires: | ||
# puppetlabs-stdlib - https://github.com/puppetlabs/puppetlabs-stdlib | ||
# | ||
# stdlib | ||
# - puppetlabs-stdlib module >= 0.1.6 | ||
# - plugin sync enabled to obtain the anchor type | ||
# | ||
# Sample Usage: | ||
# | ||
# The module works with sensible defaults: | ||
# | ||
# node default { | ||
# include pythonbrew | ||
# } | ||
class pythonbrew { | ||
|
||
class pythonbrew($user='root') { | ||
anchor {'pythonbrew::begin'} | ||
anchor {'pythonbrew::end'} | ||
class { 'stdlib': } | ||
|
||
class { 'pythonbrew::package': | ||
notify => Exec['pythonbrew::install'], | ||
} | ||
|
||
class { 'pythonbrew::params': | ||
require => Class['pythonbrew::package'], | ||
notify => Exec['pythonbrew::install'], | ||
} | ||
|
||
exec {'pythonbrew::install': | ||
command => "curl -kL http://xrl.us/pythonbrewinstall | bash", | ||
require => Class['pythonbrew::dependencies'], | ||
user => $user, | ||
} | ||
require => Class['pythonbrew::package'], | ||
user => $pythonbrew::params::user, | ||
} | ||
|
||
anchor {'pythonbrew::begin': | ||
before => Class['pythonbrew::package'], | ||
notify => Exec['pythonbrew::install'] | ||
} | ||
anchor {'pythonbrew::end': | ||
require => Exec['pythonbrew::install'], | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Class: pythonbrew::dependencies | ||
# | ||
# Takes care of system dependencies | ||
# Currently only works for ubuntu/debian | ||
# patches for centos and suse welcome | ||
|
||
class pythonbrew::package { | ||
anchor { 'pythonbrew::package::begin': } | ||
anchor { 'pythonbrew::package::end': } | ||
|
||
case $::operatingsystem { | ||
centos,fedora,rhel: { | ||
class { 'pythonbrew::package::redhat': | ||
require => Anchor['pythonbrew::package::begin'], | ||
before => Anchor['pythonbrew::package::end'], | ||
} | ||
} | ||
debian,ubuntu: { | ||
class { 'pythonbrew::package::debian': | ||
require => Anchor['pythonbrew::package::begin'], | ||
before => Anchor['pythonbrew::package::end'], | ||
} | ||
} | ||
opensuse,suse: { | ||
class { 'pythonbrew::package::suse': | ||
require => Anchor['pythonbrew::package::begin'], | ||
before => Anchor['pythonbrew::package::end'], | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Class: nginx::params | ||
# | ||
# This module manages pythonbrew paramaters | ||
# | ||
# Parameters: | ||
# | ||
# There are no default parameters for this class. | ||
# | ||
# Actions: | ||
# | ||
# Requires: | ||
# | ||
# Sample Usage: | ||
# | ||
# This class file is not called directly | ||
class pythonbrew::params { | ||
$user = 'root' | ||
$build_opt = '' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters