Documentation by YARD 0.9.36
+Alphabetic Index
+ +Puppet Class Listing A-Z
+ + +
+
+
+
|
+
File Listing
+-
+
+
+
- README + + +
diff --git a/doc/_index.html b/doc/_index.html new file mode 100644 index 0000000..f5b0f9a --- /dev/null +++ b/doc/_index.html @@ -0,0 +1,153 @@ + + +
+ + +
+
+
+
|
+
| t |
+ + + +6 +7 +8+ |
+
+ # File 'manifests/init.pp', line 6
+
+class confdroid_ssh {
+ include confdroid_ssh::params
+}
+ |
+
confdroid_ssh::firewall::iptables.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16+ |
+
+ # File 'manifests/firewall/iptables.pp', line 6
+
+class confdroid_ssh::firewall::iptables (
+
+) inherits confdroid_ssh::params {
+ firewall { "${ssh_fw_order}${ssh_fw_port} allow SSH on port ${ssh_fw_port}":
+ ensure => $ssh_fw_rule,
+ proto => 'tcp',
+ source => $ssh_source_range,
+ dport => $ssh_fw_port,
+ jump => 'accept',
+ }
+}
+ |
+
confdroid_ssh::main::config.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10+ |
+
+ # File 'manifests/main/config.pp', line 6
+
+class confdroid_ssh::main::config (
+) inherits confdroid_ssh::params {
+ require confdroid_selinux
+ include confdroid_ssh::main::service
+}
+ |
+
confdroid_ssh::main::dirs.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32+ |
+
+ # File 'manifests/main/dirs.pp', line 6
+
+class confdroid_ssh::main::dirs (
+) inherits confdroid_ssh::params {
+ require confdroid_ssh::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,
+ }
+
+ 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,
+ }
+}
+ |
+
confdroid_ssh::main::files.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46+ |
+
+ # File 'manifests/main/files.pp', line 6
+
+class confdroid_ssh::main::files (
+) inherits confdroid_ssh::params {
+ require confdroid_ssh::main::dirs
+
+ file { $sshd_config_path:
+ ensure => file,
+ path => $sshd_config_path,
+ owner => $sshd_user,
+ group => $sshd_user,
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($sshd_config_erb),
+ notify => Service[$sshd_service],
+ }
+
+ if $ssh_manage_config {
+ file { $sshd_custom_conf:
+ ensure => file,
+ path => $sshd_custom_conf,
+ owner => $sshd_user,
+ group => $sshd_user,
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($sshd_custom_erb),
+ notify => Service[$sshd_service],
+ }
+ # we want the default root login setting to be managed by the custom conf,
+ # so we remove the default file if it exists
+ file { $sshd_root_login_file:
+ ensure => absent,
+ path => $sshd_root_login_file,
+ notify => Service[$sshd_service],
+ }
+ }
+}
+ |
+
confdroid_ssh::main::install.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11+ |
+
+ # File 'manifests/main/install.pp', line 6
+
+class confdroid_ssh::main::install (
+) inherits confdroid_ssh::params {
+ package { $ssh_reqpackages:
+ ensure => $pkg_ensure,
+ }
+}
+ |
+
confdroid_ssh::main::service.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18+ |
+
+ # File 'manifests/main/service.pp', line 6
+
+class confdroid_ssh::main::service (
+) inherits confdroid_ssh::params {
+ require confdroid_ssh::main::files
+ require confdroid_ssh::selinux::semanage
+ require confdroid_ssh::firewall::iptables
+
+ service { $sshd_service:
+ ensure => running,
+ hasstatus => true,
+ hasrestart => true,
+ enable => true,
+ }
+}
+ |
+
confdroid_ssh::params.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287+ |
+
+ # File 'manifests/params.pp', line 200
+
+class confdroid_ssh::params (
+
+ Array $ssh_reqpackages = ['openssh','openssh-clients','openssh-server'],
+ String $pkg_ensure = 'present',
+
+ # firewall settings
+ String $ssh_fw_rule = 'present',
+ String $ssh_fw_port = '22',
+ String $ssh_fw_order = '50',
+ String $ssh_source_range = '0.0.0.0/0',
+
+ # sshd configuration
+ Boolean $ssh_manage_config = true,
+ String $ssh_address_family = 'any',
+ String $ssh_listen_address = '0.0.0.0',
+ String $ssh_login_grace_time = '2m',
+ String $ssh_root_login = 'prohibit-password',
+ String $ssh_strict_modes = 'yes',
+ String $ssh_max_auth_tries = '6',
+ String $ssh_max_sessions = '10',
+ String $ssh_pubkey_auth = 'yes',
+ String $ssh_auth_key_files = '.ssh/authorized_keys',
+ String $ssh_authorized_principals_file = 'none',
+ String $ssh_authorized_keys_command = 'none',
+ String $ssh_authorized_keys_command_user = 'nobody',
+ Boolean $ssh_use_specific_hostkey = false,
+ String $ssh_hostkey_type = 'rsa',
+ String $ssh_rekeylimit = 'default none',
+ String $ssh_syslog_facility = 'AUTH',
+ String $ssh_log_level = 'INFO',
+ String $ssh_password_authentication = 'yes',
+ String $ssh_permit_empty_passwords = 'no',
+ String $ssh_kbd_interactive_auth = 'yes',
+ Boolean $ssh_use_kerberos = false,
+ String $ssh_kerberos_authentication = 'yes',
+ String $ssh_kerberos_or_local_passwd = 'yes',
+ String $ssh_kerberos_ticket_cleanup = 'yes',
+ String $ssh_kerberos_get_afstoken = 'no',
+ String $ssh_kerberos_use_kuserok = 'yes',
+ Boolean $ssh_use_gssapi = false,
+ String $ssh_gssapi_authentication = 'yes',
+ String $ssh_gssapi_cleanup_credentials = 'yes',
+ String $ssh_gssapi_key_exchange = 'no',
+ String $ssh_gssapi_enablek5users = 'no',
+ String $ssh_use_pam = 'no',
+ String $ssh_allow_agent_forwarding = 'yes',
+ String $ssh_allow_tcp_forwarding = 'yes',
+ String $ssh_gateway_ports = 'no',
+ String $ssh_x11_forwarding = 'no',
+ String $ssh_x11_display_offset = '10',
+ String $ssh_x11_use_localhost = 'yes',
+ String $ssh_permit_tty = 'yes',
+ String $ssh_print_motd = 'yes',
+ String $ssh_print_lastlog = 'yes',
+ String $ssh_tcp_keepalive = 'yes',
+ String $ssh_permit_user_environment = 'no',
+ String $ssh_compression = 'delayed',
+ String $ssh_client_alive_interval = '0',
+ String $ssh_client_alive_count_max = '3',
+ String $ssh_use_dns = 'no',
+ String $ssh_pid_file = '/var/run/sshd.pid',
+ String $ssh_max_startups = '10:30:100',
+ String $ssh_permit_tunnel = 'no',
+ String $ssh_chroot_directory = 'none',
+ String $ssh_version_addendum = 'none',
+ String $ssh_banner = 'none',
+
+) {
+# 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_custom_path = "${ssh_etc_path}/sshd_config.d"
+ $sshd_custom_conf = "${sshd_custom_path}/10-custom.conf"
+ $sshd_custom_erb = 'confdroid_ssh/sshd_custom_conf.erb'
+ $sshd_config_erb = 'confdroid_ssh/sshd_config.erb'
+ $sshd_root_login_file = "${sshd_custom_path}/01-permitrootlogin.conf"
+
+ # includes must be last
+ include confdroid_ssh::main::config
+}
+ |
+
confdroid_ssh::selinux::semanage.pp Module name: confdroid_ssh Author: 12ww1160 (12ww1160@confdroid.com)
+ +
+ + + +6 +7 +8 +9 +10 +11 +12 +13+ |
+
+ # File 'manifests/selinux/semanage.pp', line 6
+
+class confdroid_ssh::selinux::semanage (
+) inherits confdroid_ssh::params {
+ exec { 'semanage_port_ssh':
+ command => "semanage port -a -t ssh_port_t -p tcp ${ssh_fw_port}",
+ unless => "semanage port -l | grep '^ssh_port_t' | grep 'tcp' | grep '${ssh_fw_port}'",
+ path => ['/usr/bin', '/usr/sbin'],
+ }
+}
+ |
+