Skip to content

Commit e9c133e

Browse files
committed
* add a switch to prevent the yum repository provisioning of SCL
* the switch is useful if the repository is already configured independent of this module
1 parent 7237071 commit e9c133e

3 files changed

Lines changed: 18 additions & 11 deletions

File tree

manifests/init.pp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
$python_pyvenvs = { },
8383
$python_requirements = { },
8484
$use_epel = $python::params::use_epel,
85+
$rhscl_use_public_repository = $python::params::rhscl_use_public_repository,
8586
) inherits python::params{
8687

8788
if $provider != undef and $provider != '' {

manifests/install.pp

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,15 +133,16 @@
133133
}
134134
rhscl: {
135135
# rhscl is RedHat SCLs from softwarecollections.org
136-
$scl_package = "rhscl-${::python::version}-epel-${::operatingsystemmajrelease}-${::architecture}"
137-
package { $scl_package:
138-
source => "https://www.softwarecollections.org/en/scls/rhscl/${::python::version}/epel-${::operatingsystemmajrelease}-${::architecture}/download/${scl_package}.noarch.rpm",
139-
provider => 'rpm',
140-
tag => 'python-scl-repo',
141-
}
142-
143-
Package <| title == 'python' |> {
144-
tag => 'python-scl-package',
136+
if $::python::rhscl_use_public_repository {
137+
$scl_package = "rhscl-${::python::version}-epel-${::operatingsystemmajrelease}-${::architecture}"
138+
package { $scl_package:
139+
source => "https://www.softwarecollections.org/en/scls/rhscl/${::python::version}/epel-${::operatingsystemmajrelease}-${::architecture}/download/${scl_package}.noarch.rpm",
140+
provider => 'rpm',
141+
tag => 'python-scl-repo',
142+
}
143+
Package <| title == 'python' |> {
144+
tag => 'python-scl-package',
145+
}
145146
}
146147

147148
package { "${python}-scldevel":
@@ -157,11 +158,14 @@
157158
}
158159
}
159160

160-
Package <| tag == 'python-scl-repo' |> ->
161+
if $::python::rhscl_use_public_repository {
162+
Package <| tag == 'python-scl-repo' |> ->
163+
Package <| tag == 'python-scl-package' |>
164+
}
165+
161166
Package <| tag == 'python-scl-package' |> ->
162167
Exec['python-scl-pip-install']
163168
}
164-
165169
default: {
166170

167171
package { 'pip':

manifests/params.pp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@
2323
default => 'gunicorn',
2424
}
2525

26+
$rhscl_use_public_repository = true
27+
2628
}

0 commit comments

Comments
 (0)