Puppet Class: psick::oracle::prerequisites::swap

Defined in:
manifests/oracle/prerequisites/swap.pp

Overview

Parameters:

  • dev_shm_size (String) (defaults to: '3500m')
  • swapfile_path (String) (defaults to: '/var/swap.1')
  • swapfile_size (String) (defaults to: '2560MB')
  • swapfile_ensure (Enum['present','absent']) (defaults to: present)
  • swapfile_mount (Boolean) (defaults to: true)
  • swapfile_options (String) (defaults to: 'defaults')


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/oracle/prerequisites/swap.pp', line 2

class psick::oracle::prerequisites::swap (

  String $dev_shm_size                      = '3500m',
  String $swapfile_path                     = '/var/swap.1',
  String $swapfile_size                     = '2560MB',
  Enum['present','absent'] $swapfile_ensure = present,
  Boolean $swapfile_mount                      = true,
  String $swapfile_options                  = 'defaults',

) {

  mount { '/dev/shm':
    ensure  => present,
    atboot  => true,
    device  => 'tmpfs',
    fstype  => 'tmpfs',
    options => "size=${dev_shm_size}",
  }

  ::swap_file::files { $swapfile_path:
    ensure       => $swapfile_ensure,
    swapfile     => $swapfile_path,
    swapfilesize => $swapfile_size,
    add_mount    => $swapfile_mount,
    options      => $swapfile_options,
  }

}