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

Add support for Suse Linux #624

Merged
merged 31 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9a68a73
Merge branch 'fix-upstream'
fbrehm Aug 31, 2018
fb99370
Version bump to 2.3.2
fbrehm Aug 31, 2018
9dac807
Merge branch 'fix-upstream'
fbrehm Sep 3, 2018
45db478
Version bump to 2.3.3
fbrehm Sep 3, 2018
0e24528
Merge branch 'upstream'
fbrehm Oct 8, 2018
6f9497e
Updating module version
fbrehm Oct 8, 2018
e036161
Merge tag 'v4.0.0' into fix-upstream
fbrehm Sep 7, 2021
3071da4
Adding manifests/repo/zypper.pp
fbrehm Sep 7, 2021
757ef00
Support of Suse zypper repos
fbrehm Sep 7, 2021
18b4269
Merge branch 'fix-upstream'
fbrehm Sep 7, 2021
848c840
Fixing manifests/repo.pp
fbrehm Sep 7, 2021
9b1122b
Version bump to 4.0.0.2
fbrehm Sep 7, 2021
a28348c
Merge branch 'fix-upstream'
fbrehm Sep 7, 2021
da5b682
Version bump to 4.0.1-rc0
fbrehm Sep 7, 2021
7b9677f
Setting version to 4.0.0
fbrehm Sep 20, 2021
12144ce
Adding SLES 12 and 15 as a supported operating system
fbrehm Sep 20, 2021
b859e3b
Setting supported version for Enterprise Linux to 3.0
fbrehm Sep 20, 2021
e16118f
Adding dependency to puppet/zypprepo
fbrehm Sep 20, 2021
06c8e44
Updating spec test for Suse
fbrehm Sep 20, 2021
605c40f
Fixing spec tests for Suse
fbrehm Sep 20, 2021
6748333
Style changes
fbrehm Sep 20, 2021
99dd8ac
Fixing package in manifests/mongos/params.pp for Suse
fbrehm Sep 20, 2021
3956fd6
Fixing config in manifests/mongos/config.pp for Suse
fbrehm Sep 20, 2021
7a293f7
Making fork on package purge for Suse
fbrehm Sep 20, 2021
22ce01a
Fixing Repo base_url for zypper
fbrehm Sep 20, 2021
61d34cd
Fixing spec/classes/repo_spec.rb for Suse
fbrehm Sep 20, 2021
2d2a584
Changing two elsifs to one
fbrehm Oct 28, 2021
f09d237
Simplifying logic in manifests/repo.pp
fbrehm Oct 28, 2021
8c008c1
Adding puppet strings documentation to manifests/repo/zypper.pp and d…
fbrehm Oct 28, 2021
106dc49
Update metadata.json
fbrehm Oct 28, 2021
cd1f749
Make the linter happy
fbrehm Oct 28, 2021
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
22 changes: 19 additions & 3 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
if $repo_location != undef {
$location = $repo_location
$description = 'MongoDB Custom Repository'
} elsif $version == undef or versioncmp($version, '3.0.0') < 0 {
fail('Package repositories for versions older than 3.0 are unsupported')
} elsif $version == undef or versioncmp($version, '3.4.0') < 0 {
fail('Package repositories for versions older than 3.4 are unsupported')
fbrehm marked this conversation as resolved.
Show resolved Hide resolved
} else {
$mongover = split($version, '[.]')
if $use_enterprise_repo {
Expand All @@ -30,6 +30,22 @@
contain mongodb::repo::yum
}

'Suse': {
if $repo_location != undef {
fbrehm marked this conversation as resolved.
Show resolved Hide resolved
$location = $repo_location
$description = 'MongoDB Custom Repository'
} elsif $version == undef or versioncmp($version, '3.2.0') < 0 {
fail('Package repositories for versions older than 3.2 are unsupported')
} else {
$mongover = split($version, '[.]')
$major_release = $facts['os']['release']['major']
$location = "https://repo.mongodb.org/zypper/suse/${major_release}/mongodb-org/${mongover[0]}.${mongover[1]}/\$basearch/"
$description = 'MongoDB Repository'
}

contain mongodb::repo::zypper
}

'Debian': {
if $repo_location != undef {
$location = $repo_location
Expand Down Expand Up @@ -73,7 +89,7 @@

default: {
if($ensure == 'present' or $ensure == true) {
fail("Unsupported managed repository for osfamily: ${facts['os']['family']}, operatingsystem: ${facts['os']['name']}, module ${module_name} currently only supports managing repos for osfamily RedHat, Debian and Ubuntu")
fail("Unsupported managed repository for osfamily: ${facts['os']['family']}, operatingsystem: ${facts['os']['name']}, module ${module_name} currently only supports managing repos for osfamily RedHat, Suse, Debian and Ubuntu")
}
}
}
Expand Down
20 changes: 20 additions & 0 deletions manifests/repo/zypper.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# PRIVATE CLASS: do not use directly
fbrehm marked this conversation as resolved.
Show resolved Hide resolved
class mongodb::repo::zypper inherits mongodb::repo {
# We try to follow/reproduce the instruction
# http://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat-centos-or-fedora-linux/

fbrehm marked this conversation as resolved.
Show resolved Hide resolved
if $mongodb::repo::ensure == 'present' or $mongodb::repo::ensure == true {
zypprepo { 'mongodb':
descr => $mongodb::repo::description,
baseurl => $mongodb::repo::location,
gpgcheck => '0',
enabled => '1',
}
Zypprepo['mongodb'] -> Package<| tag == 'mongodb_package' |>
}
else {
zypprepo { 'mongodb':
ensure => absent,
}
}
}
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppet-mongodb",
"version": "4.0.0",
"version": "4.0.1-rc0",
fbrehm marked this conversation as resolved.
Show resolved Hide resolved
"author": "Vox Pupuli",
"summary": "Installs MongoDB on RHEL/Ubuntu/Debian.",
"license": "Apache-2.0",
Expand Down