Skip to content

Commit

Permalink
Merge pull request #16 from jordiprats/master
Browse files Browse the repository at this point in the history
lint
  • Loading branch information
jordiprats authored May 11, 2018
2 parents 97b549a + 2b8ddd4 commit 30c60f6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
3 changes: 3 additions & 0 deletions examples/redis.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
class { 'redis': }

redis::instance { '4444': }
16 changes: 8 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class redis(
$manage_package = true,
$package_ensure = 'installed',
$manage_service = true,
$manage_docker_service = true,
$service_ensure = 'stopped',
$service_enable = false,
) inherits redis::params{
class redis (
$manage_package = true,
$package_ensure = 'installed',
$manage_service = true,
$manage_docker_service = true,
$service_ensure = 'stopped',
$service_enable = false,
) inherits redis::params{

class { '::redis::install': } ->
class { '::redis::service': } ->
Expand Down
12 changes: 5 additions & 7 deletions manifests/install.pp
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# == Class: redis
#
# === redis::install documentation
#
class redis::install inherits redis {

file { '/etc/redis':
Expand All @@ -13,14 +9,16 @@

if($redis::params::os_flavor=='RH')
{
include ::epel
if($redis::manage_package)
{
include ::epel

Package['epel-release'] -> Package[$redis::params::package_name]
Class['::epel'] -> Package[$redis::params::package_name]
}
}

if($redis::manage_package)
{
# package here, for example:
package { $redis::params::package_name:
ensure => $redis::package_ensure,
}
Expand Down

0 comments on commit 30c60f6

Please sign in to comment.