Compare commits
1 Commits
7f6abba414
...
b2409aa847
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2409aa847 |
@@ -24,7 +24,7 @@
|
||||
## Features
|
||||
|
||||
- install required binaries
|
||||
- manage local custom configuration based on parameters, overriding the defaults
|
||||
- manage configuration based on parameters
|
||||
- manage service
|
||||
- (optional) manage firewall
|
||||
|
||||
|
||||
@@ -9,10 +9,9 @@ class confdroid_ssh::firewall::iptables (
|
||||
if $ssh_use_firewall {
|
||||
firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
|
||||
ensure => 'present',
|
||||
proto => 'tcp',
|
||||
source => $ssh_source_range,
|
||||
dport => $ssh_fw_port,
|
||||
jump => 'accept',
|
||||
proto => 'tcp',
|
||||
dport => $ssh_fw_port,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,15 +18,4 @@ class confdroid_ssh::main::dirs (
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
|
||||
file { $sshd_custom_path:
|
||||
ensure => directory,
|
||||
owner => $sshd_user,
|
||||
group => $sshd_user,
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,8 @@ class confdroid_ssh::main::files (
|
||||
file { $sshd_config_path:
|
||||
ensure => file,
|
||||
path => $sshd_config_path,
|
||||
owner => $sshd_user,
|
||||
group => $sshd_user,
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => '0640',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
@@ -19,19 +19,4 @@ class confdroid_ssh::main::files (
|
||||
seluser => system_u,
|
||||
content => template($sshd_config_erb),
|
||||
}
|
||||
|
||||
if $ssh_manage_config {
|
||||
file { $sshd_custom_conf:
|
||||
ensure => file,
|
||||
path => $sshd_custom_conf,
|
||||
owner => $sshd_user,
|
||||
group => $sshd_user,
|
||||
mode => '0755',
|
||||
selrange => s0,
|
||||
selrole => object_r,
|
||||
seltype => etc_t,
|
||||
seluser => system_u,
|
||||
content => template($sshd_custom_erb),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
# @param [Boolean] ssh_use_firewall whether to manage firewall settings
|
||||
# @param [String] ssh_fw_port port to use for SSHD and in fw
|
||||
# @param [String] ssh_fw_order order of firewall rule
|
||||
# @param [String] ssh_source_range source range for firewall rule
|
||||
# @param [Boolean] ssh_manage_config whether to manage the configuration
|
||||
##############################################################################
|
||||
class confdroid_ssh::params (
|
||||
|
||||
@@ -19,10 +17,6 @@ class confdroid_ssh::params (
|
||||
Boolean $ssh_use_firewall = true,
|
||||
String $ssh_fw_port = '22',
|
||||
String $ssh_fw_order = '50',
|
||||
String $ssh_source_range = '0.0.0.0/0',
|
||||
|
||||
# main configuration
|
||||
Boolean $ssh_manage_config = true,
|
||||
|
||||
) {
|
||||
# default facts
|
||||
@@ -36,9 +30,6 @@ class confdroid_ssh::params (
|
||||
$ssh_etc_path = '/etc/ssh'
|
||||
$sshd_service = 'sshd'
|
||||
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
||||
$sshd_custom_path = "${ssh_etc_path}/sshd_config.d"
|
||||
$sshd_custom_conf = "${sshd_custom_path}/10-custom.conf"
|
||||
$sshd_custom_erb = 'confdroid_ssh/ssh_custom_conf.erb'
|
||||
$sshd_config_erb = 'confdroid_ssh/ssh_config.erb'
|
||||
|
||||
# includes must be last
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
###############################################################################
|
||||
##### DO NOT EDIT THIS FILE MANUALLY #
|
||||
##### This file is managed by Puppet. Any changes to this file will be #
|
||||
##### overwritten. The file is built via parameters, so any changes should #
|
||||
##### be made in the Puppet manifest parameters. #
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user