full commit

This commit is contained in:
Arne Teuke
2025-04-22 15:58:46 +02:00
parent 35a641a70b
commit 3a0fd39423
12 changed files with 601 additions and 76 deletions

9
manifests/main/config.pp Normal file
View 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
View 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
View 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
View 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
View 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,
}
}