Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to add Centos 7 support #370

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/os/CentOS.7.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
puppetboard::python_version: '3.6'
puppetboard::python_version: 'rh-python38'
2 changes: 1 addition & 1 deletion data/os/RedHat.7.yaml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
puppetboard::python_version: '3.6'
puppetboard::python_version: 'rh-python38'
1 change: 0 additions & 1 deletion data/os/Ubuntu.16.04.yaml

This file was deleted.

19 changes: 14 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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']
}
Expand Down
19 changes: 2 additions & 17 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
],
Expand Down
5 changes: 5 additions & 0 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
class { 'puppetdb':
disable_ssl => true,
manage_firewall => false,
database => 'embedded',
}

# Configure Puppetboard
Expand Down Expand Up @@ -57,6 +58,7 @@ class { 'apache':
class { 'puppetdb':
disable_ssl => true,
manage_firewall => false,
database => 'embedded',
}

# Configure Puppetboard
Expand Down Expand Up @@ -106,6 +108,7 @@ class { 'puppetboard':
class { 'puppetdb':
disable_ssl => true,
manage_firewall => false,
database => 'embedded',
}
EOS

Expand Down Expand Up @@ -146,6 +149,7 @@ class { 'puppetboard::apache::conf':
class { 'puppetdb':
disable_ssl => true,
manage_firewall => false,
database => 'embedded',
}
EOS

Expand Down Expand Up @@ -194,6 +198,7 @@ class { 'puppetboard::apache::conf':
class { 'puppetdb':
disable_ssl => true,
manage_firewall => false,
database => 'embedded',
}
EOS

Expand Down