diff --git a/data/os/CentOS.7.yaml b/data/os/CentOS.7.yaml index 72b8ec12..c69e1a17 100644 --- a/data/os/CentOS.7.yaml +++ b/data/os/CentOS.7.yaml @@ -1 +1 @@ -puppetboard::python_version: '3.6' +puppetboard::python_version: 'rh-python38' diff --git a/data/os/RedHat.7.yaml b/data/os/RedHat.7.yaml index 72b8ec12..c69e1a17 100644 --- a/data/os/RedHat.7.yaml +++ b/data/os/RedHat.7.yaml @@ -1 +1 @@ -puppetboard::python_version: '3.6' +puppetboard::python_version: 'rh-python38' diff --git a/data/os/Ubuntu.16.04.yaml b/data/os/Ubuntu.16.04.yaml deleted file mode 100644 index 8eff4ab8..00000000 --- a/data/os/Ubuntu.16.04.yaml +++ /dev/null @@ -1 +0,0 @@ -puppetboard::python_version: '3.5' diff --git a/manifests/init.pp b/manifests/init.pp index 129d8646..4fe0a806 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -59,7 +59,7 @@ class puppetboard ( Stdlib::Absolutepath $apache_confd, String[1] $apache_service, - Pattern[/^3\.\d$/] $python_version, + Variant[Enum['rh-python38'], Pattern[/^3\.\d$/]] $python_version, Enum['package', 'pip', 'vcsrepo'] $install_from = 'pip', Boolean $manage_selinux = pick($facts['os.selinux.enabled'], false), String $user = 'puppetboard', @@ -242,10 +242,19 @@ } if $manage_virtualenv { - class { 'python': - version => $python_version, - dev => 'present', - venv => 'present', + if $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '7' { + class { 'python': + provider => 'rhscl', + version => $python_version, + dev => 'present', + venv => 'present', + } + } else { + class { 'python': + version => $python_version, + dev => 'present', + venv => 'present', + } } Class['python'] -> Class['puppetboard'] } diff --git a/metadata.json b/metadata.json index 7956a1ca..c0065720 100644 --- a/metadata.json +++ b/metadata.json @@ -14,24 +14,9 @@ "issues_url": "https://github.com/voxpupuli/puppet-puppetboard/issues", "operatingsystem_support": [ { - "operatingsystem": "Debian", + "operatingsystem": "CentOS", "operatingsystemrelease": [ - "10", - "11" - ] - }, - { - "operatingsystem": "FreeBSD", - "operatingsystemrelease": [ - "12", - "13" - ] - }, - { - "operatingsystem": "Ubuntu", - "operatingsystemrelease": [ - "18.04", - "20.04" + "7" ] } ], diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index 786a28ad..4d1ec2da 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -19,6 +19,7 @@ class { 'puppetdb': disable_ssl => true, manage_firewall => false, + database => 'embedded', } # Configure Puppetboard @@ -57,6 +58,7 @@ class { 'apache': class { 'puppetdb': disable_ssl => true, manage_firewall => false, + database => 'embedded', } # Configure Puppetboard @@ -106,6 +108,7 @@ class { 'puppetboard': class { 'puppetdb': disable_ssl => true, manage_firewall => false, + database => 'embedded', } EOS @@ -146,6 +149,7 @@ class { 'puppetboard::apache::conf': class { 'puppetdb': disable_ssl => true, manage_firewall => false, + database => 'embedded', } EOS @@ -194,6 +198,7 @@ class { 'puppetboard::apache::conf': class { 'puppetdb': disable_ssl => true, manage_firewall => false, + database => 'embedded', } EOS