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 Puppet8x support #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
9 changes: 4 additions & 5 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,9 @@
#
# Dejan Golja <[email protected]>
#
class gnupg(
$package_ensure = $gnupg::params::package_ensure,
$package_name = $gnupg::params::package_name,
class gnupg (
String $package_ensure = $gnupg::params::package_ensure,
String $package_name = $gnupg::params::package_name,
) inherits gnupg::params {

class {'::gnupg::install': }
class { 'gnupg::install': }
}
4 changes: 1 addition & 3 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#
class gnupg::install {

package { 'gnupg':
ensure => $gnupg::package_ensure,
name => $gnupg::package_name,
}

}
}
10 changes: 4 additions & 6 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# PRIVATE CLASS: do not use directly
class gnupg::params {

$package_ensure = 'present'

case $::osfamily {
case $facts['os']['family'] {
'Debian': {
$package_name ='gnupg'
}
Expand All @@ -15,16 +14,15 @@
}

'Linux': {
if $::operatingsystem == 'Amazon' {
if $facts['os']['name'] == 'Amazon' {
$package_name = 'gnupg2'
}
else {
fail("Osfamily ${::osfamily} with operating system ${::operatingsystem} is not supported")
fail("Osfamily ${facts['os']['family']} with operating system ${facts['os']['name']} is not supported")
}
}
default: {
fail("Osfamily ${::osfamily} is not supported")
fail("Osfamily ${facts['os']['family']} is not supported")
}
}

}
8 changes: 2 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"summary": "Manage gnupg package and public keys",
"license": "Apache-2.0",
"source": "git://github.com/n1tr0g/golja-gnupg.git",
"project_page": "https://github.com/n1tr0g/golja-gnupg",
"project_page": "https://github.com/flepoutre/golja-gnupg",
"issues_url": "https://github.com/n1tr0g/golja-gnupg/issues",
"operatingsystem_support": [
{
Expand Down Expand Up @@ -50,11 +50,7 @@
"requirements": [
{
"name": "puppet",
"version_requirement": ">=3.0.0 <4.0.0"
},
{
"name": "pe",
"version_requirement": ">=3.0.0 <4.0.0"
"version_requirement": ">=3.0.0 <9.0.0"
}
],
"tags": [
Expand Down
40 changes: 0 additions & 40 deletions tests/gnupg_key.pp

This file was deleted.

1 change: 0 additions & 1 deletion tests/init.pp

This file was deleted.