Puppet Class: cis_benchmarks::prereq

Inherits:
::cis_benchmarks::params
Defined in:
manifests/prereq.pp

Overview

Parameters:

  • cis_scripts_dir (Any) (defaults to: lookup("cis_benchmarks::${::cis_benchmarks::cis_version}::cis_scripts_dir", String, 'first', '/tmp/cis_scripts/'))
  • cis_scripts (Any) (defaults to: lookup("cis_benchmarks::${::cis_benchmarks::cis_version}::cis_scripts", Array, 'first', $::cis_benchmarks::params::cis_scripts ))


2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'manifests/prereq.pp', line 2

class cis_benchmarks::prereq (
  $cis_scripts_dir = lookup("cis_benchmarks::${::cis_benchmarks::cis_version}::cis_scripts_dir", String, 'first', '/tmp/cis_scripts/'),
  $cis_scripts     = lookup("cis_benchmarks::${::cis_benchmarks::cis_version}::cis_scripts", Array, 'first', $::cis_benchmarks::params::cis_scripts ),
) inherits ::cis_benchmarks::params {

  ### CIS BENCHMARK PREREQUISITE STEPS

  # location for CIS shell scripts

  file { $cis_scripts_dir :
      ensure => directory,
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
      noop   => false,
    }


  # place CIS shell script on each node
  each($cis_scripts) |$item| {
    file { "${cis_scripts_dir}/${item}":
      ensure => file,
      source => "puppet:///modules/cis_benchmarks/${item}",
      mode   => '0755',
    }
  }

}