Skip to content

Commit

Permalink
Adding note about Puppet 3 support (voxpupuli#153)
Browse files Browse the repository at this point in the history
* Adding deprecation warning
* First steps towards the work in voxpupuli#152
  • Loading branch information
petems authored Jul 3, 2017
1 parent baf03df commit 1b882d1
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ Test against a specific Puppet or Facter version:
$ PUPPET_VERSION=4.10.0 bundle update && bundle exec rake spec
$ FACTER_VERSION=1.6.8 bundle update && bundle exec rake spec

## Puppet 3 Support

Puppet 3 is EOL as-of January 2017. The last release of this module that will
support Puppet 3.X and earlier will be the 3.X.X module releases.

Module versions from 4.X.X onwards will use Puppet 4 only features and will not work with
earlier versions.

We would recommend upgrading your Puppet agent to the latest release, as Puppet 4 comes with a load of awesome new features.

If you're stuck with older Puppet, you could also fork the module from 3.0.0 and use your fork as a Puppet 3 supported version.

## Contributing

* Fork it
Expand Down
4 changes: 4 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,10 @@
~> Class['redis::service']
}

if $::puppetversion and versioncmp($::puppetversion, '4.0.0') < 0 {
warning("Puppet 3 is EOL as of 01/01/2017, The 3.X.X releases of the module are the last that will support Puppet 3\nFor more information, see https://github.com/arioch/puppet-redis#puppet-3-support")
}

# Sanity check
if $::redis::slaveof {
if $::redis::bind =~ /^127.0.0./ {
Expand Down
6 changes: 6 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def centos_facts
{
:operatingsystem => 'CentOS',
:osfamily => 'RedHat',
:puppetversion => '4.5.2',
}
end

Expand All @@ -89,13 +90,15 @@ def debian_facts
:operatingsystem => 'Debian',
:osfamily => 'Debian',
:operatingsystemmajrelease => '8',
:puppetversion => '4.5.2',
}
end

def freebsd_facts
{
:operatingsystem => 'FreeBSD',
:osfamily => 'FreeBSD',
:puppetversion => '4.5.2',
}
end

Expand All @@ -104,6 +107,7 @@ def centos_6_facts
:operatingsystem => 'CentOS',
:osfamily => 'RedHat',
:operatingsystemmajrelease => '6',
:puppetversion => '4.5.2',
}
end

Expand All @@ -112,13 +116,15 @@ def ubuntu_1404_facts
:operatingsystem => 'Ubuntu',
:osfamily => 'Debian',
:operatingsystemmajrelease => '14.04',
:puppetversion => '4.5.2'
}
end

def archlinux_facts
{
:operatingsystem => 'Archlinux',
:osfamily => 'Archlinux',
:puppetversion => '4.5.2',
}
end

Expand Down

0 comments on commit 1b882d1

Please sign in to comment.