Skip to content

Commit 1296a7b

Browse files
author
Joshua Hoblitt
committed
restructure module so all classes for the inheritance hierarchy pureftpd -> pureftpd::params -> pureftpd::<foo>
1 parent 12b5798 commit 1296a7b

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
lines changed

manifests/config.pp

+1-7
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,7 @@
115115
$tls = false,
116116
$ipv4only = false,
117117
$ipv6only = false,
118-
119-
$use_selinux = false,
120-
){
121-
122-
class { 'pureftpd':
123-
use_selinux => $use_selinux
124-
}
118+
) inherits pureftpd::params {
125119

126120
$default_auth = 'unix'
127121

manifests/init.pp

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
#
2020
class pureftpd (
2121
$use_selinux=false
22-
){
23-
include pureftpd::params, pureftpd::install, pureftpd::service
22+
) {
23+
include pureftpd::install, pureftpd::config, pureftpd::service
24+
25+
Class[ 'pureftpd::install' ] ->
26+
Class[ 'pureftpd::config' ] ->
27+
Class[ 'pureftpd::service' ] ->
28+
Class[ 'pureftpd' ]
2429
}

manifests/install.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#
1414
# 5Ub-Z3r0
1515
#
16-
class pureftpd::install {
16+
class pureftpd::install inherits pureftpd::params {
1717
package { $pureftpd::params::package_name:
1818
ensure => present,
1919
}

manifests/params.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#
2222
# 5Ub-Z3r0
2323
#
24-
class pureftpd::params {
24+
class pureftpd::params inherits pureftpd {
2525
case $::osfamily {
2626
'RedHat':{
2727
$package_name = $pureftpd::use_selinux ?{

manifests/service.pp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#
1313
# 5Ub-Z3r0
1414
#
15-
class pureftpd::service {
15+
class pureftpd::service inherits pureftpd::params {
1616
service { $pureftpd::params::service_name:
1717
ensure => running,
1818
enable => true,

0 commit comments

Comments
 (0)