OP#561 initial commit after fork
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
## ssh_cd::init.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class initializes the ssh_cd module
|
||||
## confdroid_ssh::init.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class initializes the confdroid_ssh module
|
||||
##############################################################################
|
||||
class ssh_cd {
|
||||
include ssh_cd::params
|
||||
class confdroid_ssh {
|
||||
include confdroid_ssh::params
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## ssh_cd::main::config.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_ssh::main::config.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages module logic
|
||||
##############################################################################
|
||||
class ssh_cd::main::config (
|
||||
) inherits ssh_cd::params {
|
||||
include ssh_cd::main::service
|
||||
class confdroid_ssh::main::config (
|
||||
) inherits confdroid_ssh::params {
|
||||
include confdroid_ssh::main::service
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## ssh_cd::main::dirs.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_ssh::main::dirs.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages directories
|
||||
##############################################################################
|
||||
class ssh_cd::main::dirs (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::install
|
||||
class confdroid_ssh::main::dirs (
|
||||
) inherits confdroid_ssh::params {
|
||||
require confdroid_ssh::main::install
|
||||
|
||||
file { $ssh_etc_path:
|
||||
ensure => directory,
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## ssh_cd::main::files.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_ssh::main::files.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages files
|
||||
##############################################################################
|
||||
class ssh_cd::main::files (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::dirs
|
||||
class confdroid_ssh::main::files (
|
||||
) inherits confdroid_ssh::params {
|
||||
require confdroid_ssh::main::dirs
|
||||
|
||||
file { $sshd_config_path:
|
||||
ensure => file,
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
## ssh_cd::main::install.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_ssh::main::install.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages installation
|
||||
##############################################################################
|
||||
class ssh_cd::main::install (
|
||||
) inherits ssh_cd::params {
|
||||
class confdroid_ssh::main::install (
|
||||
) inherits confdroid_ssh::params {
|
||||
package { $reqpackages:
|
||||
ensure => $pkg_ensure,
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
## ssh_cd::main::service.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
## confdroid_ssh::main::service.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class manages service settings
|
||||
##############################################################################
|
||||
class ssh_cd::main::service (
|
||||
) inherits ssh_cd::params {
|
||||
require ssh_cd::main::files
|
||||
class confdroid_ssh::main::service (
|
||||
) inherits confdroid_ssh::params {
|
||||
require confdroid_ssh::main::files
|
||||
|
||||
service { $sshd_service:
|
||||
ensure => running,
|
||||
|
||||
@@ -1,22 +1,29 @@
|
||||
## ssh_cd::params.pp
|
||||
# Module name: ssh_cd
|
||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||
# @summary Class contains all class parameters for ssh_cd
|
||||
## confdroid_ssh::params.pp
|
||||
# Module name: confdroid_ssh
|
||||
# Author: 12ww1160 (12ww1160@confdroid.com)
|
||||
# @summary Class contains all class parameters for confdroid_ssh
|
||||
# @param [Array] reqpackages packages to install
|
||||
# @param [String] pkg_ensure version to install: 'present' or 'latest'
|
||||
##############################################################################
|
||||
class ssh_cd::params (
|
||||
class confdroid_ssh::params (
|
||||
|
||||
Array $reqpackages = ['openssh','openssh-clients','openssh-server'],
|
||||
String $pkg_ensure = 'latest',
|
||||
String $pkg_ensure = 'present',
|
||||
|
||||
) {
|
||||
# default facts
|
||||
$fqdn = $facts['networking']['fqdn']
|
||||
$hostname = $facts['networking']['hostname']
|
||||
$domain = $facts['networking']['domain']
|
||||
$os_name = $facts['os']['name']
|
||||
$os_release = $facts['os']['release']['major']
|
||||
|
||||
$sshd_user = 'root'
|
||||
$ssh_etc_path = '/etc/ssh'
|
||||
$sshd_service = 'sshd'
|
||||
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
||||
$sshd_config_erb = 'ssh_cd/ssh_config.erb'
|
||||
$sshd_config_erb = 'confdroid_ssh/ssh_config.erb'
|
||||
|
||||
# includes must be last
|
||||
include ssh_cd::main::config
|
||||
include confdroid_ssh::main::config
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user