OP#561 add custom conf dir
This commit is contained in:
@@ -18,4 +18,15 @@ class confdroid_ssh::main::dirs (
|
|||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
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,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,13 @@ class confdroid_ssh::main::files (
|
|||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template($sshd_config_erb),
|
content => template($sshd_config_erb),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $ssh_manage_config {
|
||||||
|
file { "${ssh_etc_path}/sshd_config.d":
|
||||||
|
ensure => directory,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0755',
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ class confdroid_ssh::params (
|
|||||||
String $ssh_fw_order = '50',
|
String $ssh_fw_order = '50',
|
||||||
String $ssh_source_range = '0.0.0.0/0',
|
String $ssh_source_range = '0.0.0.0/0',
|
||||||
|
|
||||||
|
# main configuration
|
||||||
|
Boolean $ssh_manage_config = true,
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# default facts
|
# default facts
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
@@ -32,6 +35,7 @@ class confdroid_ssh::params (
|
|||||||
$ssh_etc_path = '/etc/ssh'
|
$ssh_etc_path = '/etc/ssh'
|
||||||
$sshd_service = 'sshd'
|
$sshd_service = 'sshd'
|
||||||
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
$sshd_config_path = "${ssh_etc_path}/sshd_config"
|
||||||
|
$sshd_custom_path = "${ssh_etc_path}/sshd_config.d"
|
||||||
$sshd_config_erb = 'confdroid_ssh/ssh_config.erb'
|
$sshd_config_erb = 'confdroid_ssh/ssh_config.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
|
|||||||
7
templates/ssh_custom_conf.erb
Normal file
7
templates/ssh_custom_conf.erb
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
###############################################################################
|
||||||
|
##### 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