Puppet Class: secure_linux_cis::sshd_service

Defined in:
manifests/sshd_service.pp

Overview

Helper class for reloading various services when needed

Examples:

include secure_linux_cis::redhat7


6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'manifests/sshd_service.pp', line 6

class secure_linux_cis::sshd_service {
  # ## Shared resources used in more than one class
  # # Set default path for execs
  # Exec { path => '/bin/:/sbin/:/usr/bin/:/usr/sbin/' }

  # # Reload sshd config (only if running)
  # exec { 'reload sshd':
  #   command     => 'systemctl reload sshd',
  #   onlyif      => 'systemctl status sshd | grep running',
  #   refreshonly => true,
  # }

  service { 'sshd':
    ensure => running,
    enable => true,
  }
}