Skip to content

Commit

Permalink
#3287: hardcode 'system::packages' dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
jeff1evesque committed Oct 3, 2018
1 parent 7b19af2 commit 6fd002b
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 21 deletions.
2 changes: 2 additions & 0 deletions hiera/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ system:
scrypt: '0.8.6'
pymongo: '3.7.1'
mlxtend: '0.13.0'
requests: '2.9.1'
flask: '10.0.2'
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
### dependency.pp, ensure directories.
###
class mariadb::dependency {
## python dependencies
contain python
contain system::packages

## local variables
$root_dir = $::mariadb::root_dir
Expand All @@ -13,15 +12,15 @@
if ($redis_version and $redis_version != '*') {
package { 'pyyaml':
ensure => $pyyaml_version,
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}
}
else {
package { 'pyyaml':
ensure => 'installed',
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}
}

Expand Down
10 changes: 5 additions & 5 deletions puppet/environment/docker/modules/sklearn/manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
### install.pp, install sklearn.
###
class sklearn::install {
include python
include system::packages

## local variables
$root_dir = $::sklearn::root_dir
Expand Down Expand Up @@ -33,15 +33,15 @@
if ($scikit_learn and $scikit_learn != '*') {
package { "scikit_learn==${scikit_learn}":
ensure => 'installed',
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}
}
else {
package { 'scikit_learn':
ensure => 'installed',
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}
}
}
18 changes: 8 additions & 10 deletions puppet/environment/docker/modules/webserver/manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
###
class webserver::install {
## python dependencies
include python
include python::flask
include python::requests
include system::packages

## local variables
$pyyaml_version = $::webserver::pyyaml_version
Expand All @@ -19,23 +17,23 @@
if ($platform == 'development') {
package { 'pytest-cov':
ensure => $pytest_cov_version,
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}
}

## pyyaml
package { 'pyyaml':
ensure => $pyyaml_version,
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}

## redis client
package { 'redis':
ensure => $redis_version,
provider => 'pip',
require => Class['python'],
provider => 'pip3',
require => Class['system::packages'],
}

## mariadb client
Expand All @@ -51,6 +49,6 @@
## install gunicorn
package { 'gunicorn':
ensure => $gunicorn_version,
provider => 'pip',
provider => 'pip3',
}
}

0 comments on commit 6fd002b

Please sign in to comment.