full commit
This commit is contained in:
9
manifests/main/config.pp
Normal file
9
manifests/main/config.pp
Normal file
@@ -0,0 +1,9 @@
|
||||
## ssh_cd::main::config.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages module logic
|
||||
##############################################################################
|
||||
class ssh_cd::main::config (
|
||||
) inherits ssh_cd::params {
|
||||
include ssh_cd::main::service
|
||||
}
|
||||
21
manifests/main/dirs.pp
Normal file
21
manifests/main/dirs.pp
Normal file
@@ -0,0 +1,21 @@
|
||||
## ssh_cd::main::dirs.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages directories
|
||||
##############################################################################
|
||||
class ssh_cd::main::dirs (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::install
|
||||
|
||||
file { $ssh_etc_path:
|
||||
ensure => directory,
|
||||
path => $ssh_etc_path,
|
||||
owner => $sshd_user,
|
||||
group => $sshd_user,
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}
|
||||
22
manifests/main/files.pp
Normal file
22
manifests/main/files.pp
Normal file
@@ -0,0 +1,22 @@
|
||||
## ssh_cd::main::files.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages files
|
||||
##############################################################################
|
||||
class ssh_cd::main::files (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::dirs
|
||||
|
||||
file { $sshd_config_path:
|
||||
ensure => file,
|
||||
path => $sshd_config_path,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
content => template($sshd_config_erb),
|
||||
}
|
||||
}
|
||||
11
manifests/main/install.pp
Normal file
11
manifests/main/install.pp
Normal file
@@ -0,0 +1,11 @@
|
||||
## ssh_cd::main::install.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages installation
|
||||
##############################################################################
|
||||
class ssh_cd::main::install (
|
||||
) inherits ssh_cd::params {
|
||||
package { $reqpackages:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
}
|
||||
16
manifests/main/service.pp
Normal file
16
manifests/main/service.pp
Normal file
@@ -0,0 +1,16 @@
|
||||
## ssh_cd::main::service.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class manages service settings
|
||||
##############################################################################
|
||||
class ssh_cd::main::service (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::files
|
||||
|
||||
service { $sshd_service:
|
||||
ensure => running,
|
||||
hasstatus => true,
|
||||
hasrestart => true,
|
||||
enable => true,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user