Add support to install from alternate locations
Add support to install bandersnatch from a user-specified mercurial repo. Change-Id: I6853ee894c4a5d62a93aedf4b0e9dfaaa96f2c87
This commit is contained in:
parent
9714729ba5
commit
08b809cd6d
@ -16,12 +16,32 @@
|
||||
#
|
||||
# Class to install common bandersnatch items.
|
||||
#
|
||||
class bandersnatch {
|
||||
class bandersnatch (
|
||||
$bandersnatch_source = 'pip',
|
||||
) {
|
||||
|
||||
if ($bandersnatch_source == 'pip') {
|
||||
package { 'bandersnatch':
|
||||
ensure => 'present',
|
||||
provider => 'pip',
|
||||
}
|
||||
} else {
|
||||
vcsrepo { '/opt/bandersnatch':
|
||||
ensure => latest,
|
||||
provider => hg,
|
||||
source => $bandersnatch_source,
|
||||
}
|
||||
|
||||
exec { 'install_bandersnatch' :
|
||||
command => 'pip install -U /opt/bandersnatch',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
refreshonly => true,
|
||||
subscribe => Vcsrepo['/opt/bandersnatch'],
|
||||
require => [
|
||||
Class['pip'],
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
file { '/var/log/bandersnatch':
|
||||
ensure => directory,
|
||||
|
Loading…
Reference in New Issue
Block a user