Puppet Class: psick::aws::sdk

Defined in:
manifests/aws/sdk.pp

Overview

This class installs and configures Aws SDK gems

Parameters:

  • ensure (String) (defaults to: 'present')

    Define if to install (present), remote (absent) sdk gems

  • install_gems (Array) (defaults to: ['aws-sdk'])

    The gems to install

  • install_system_gems (Boolean) (defaults to: true)

    If to install danger gems on the system

  • install_puppet_gems (Boolean) (defaults to: true)

    If to install danger gems via puppet gem

  • manage (Boolean) (defaults to: $psick::manage)
  • noop_manage (Boolean) (defaults to: $psick::noop_manage)
  • noop_value (Boolean) (defaults to: $psick::noop_value)


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
# File 'manifests/aws/sdk.pp', line 8

class psick::aws::sdk (
  String  $ensure              = 'present',
  Array   $install_gems        = ['aws-sdk'],
  Boolean $install_system_gems = true,
  Boolean $install_puppet_gems = true,

  Boolean          $manage               = $psick::manage,
  Boolean          $noop_manage          = $psick::noop_manage,
  Boolean          $noop_value           = $psick::noop_value,

) {
  if $manage {
    if $noop_manage {
      noop($noop_value)
    }

    $install_gems.each | $gem | {
      if $facts['os']['family'] != 'windows' {
        if $install_system_gems {
          contain psick::ruby
          package { $gem:
            ensure   => $ensure,
            provider => 'gem',
            require  => Class['psick::ruby'],
          }
        }
      }
      if $install_puppet_gems {
        package { "puppet_${gem}":
          ensure   => $ensure,
          name     => $gem,
          provider => 'puppet_gem',
        }
      }
    }
  }
}