comparison manifests/templates.pp @ 272:c42fb28cff86

Update to a newer Python module This also pulls in an EPEL module (which we don't use) and a newer stdlib version.
author IBBoard <dev@ibboard.co.uk>
date Fri, 03 Jan 2020 19:56:04 +0000
parents c62728474654
children b2571c28fc27
comparison
equal deleted inserted replaced
271:c62728474654 272:c42fb28cff86
230 } 230 }
231 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7': 231 file { '/etc/pki/rpm-gpg/RPM-GPG-KEY-webtatic-el7':
232 ensure => absent, 232 ensure => absent,
233 } 233 }
234 234
235 # Install Pip and symlink it so we can use it as a package provider 235 if $operatingsystem == 'CentOS' and versioncmp($operatingsystemrelease, '8') >= 0 {
236 package { 'python2-pip': 236 $python_ver = 'python3'
237 ensure => installed; 237 } else {
238 } 238 $python_ver = 'system'
239 -> 239 }
240 file { '/usr/bin/pip-python': 240
241 ensure => link, 241 class { 'python':
242 target => '/usr/bin/pip', 242 ensure => 'present',
243 } -> Package <| provider == 'pip' |> 243 version => $python_ver,
244 pip => 'present',
245 virtualenv => 'present',
246 use_epel => false,
247 }
244 } 248 }
245 249
246 class tools { 250 class tools {
247 $packages = [ 'sqlite', 'bash-completion', 'nano', 'bzip2', 'mlocate', 'patch', 'tmux', 'wget' ] 251 $packages = [ 'sqlite', 'bash-completion', 'nano', 'bzip2', 'mlocate', 'patch', 'tmux', 'wget' ]
248 package { $packages: 252 package { $packages:
662 # mod_wsgi for Python support 666 # mod_wsgi for Python support
663 'wsgi': 667 'wsgi':
664 lib => $mod_wsgi_lib, 668 lib => $mod_wsgi_lib,
665 } 669 }
666 670
667 include python::venv
668
669 # Create Python virtualenvs for the dev site apps 671 # Create Python virtualenvs for the dev site apps
670 python::venv::isolate { 672 file {
671 "/srv/rhodecode/virtualenv":; 673 "/srv/rhodecode":
672 "/srv/trac/virtualenv":; 674 ensure => 'directory';
675 "/srv/trac":
676 ensure => 'directory';
677 } ->
678 python::virtualenv {
679 # Distribute is described as "simple compatibility layer that installs Setuptools 0.7+"
680 # and leads to 'module "importlib._bootstrap" has no attribute "SourceFileLoader"'
681 "/srv/rhodecode/virtualenv":
682 distribute => false,
683 version => '3';
684 "/srv/trac/virtualenv":
685 distribute => false,
686 version => '3';
673 } 687 }
674 688
675 # Graphviz for Trac "master ticket" graphs 689 # Graphviz for Trac "master ticket" graphs
676 package { 'graphviz': 690 package { 'graphviz':
677 ensure => installed, 691 ensure => installed,