JDK site.pp code

class jdk {

  if $operatingsystem == 'windows' {

    if $architecture == 'x86' {

      package { 'Java SE Development Kit 8 Update 60':

ensure => installed,

source => '\\puppet\export\jdk-8u60-windows-i586.exe',

install_options => '/s',

      }#package

    }#if

    if $architecture == 'x64' {

      package { 'Java SE Development Kit 8 Update 60':

ensure => installed,

source => '\\puppet\export\jdk-8u60-windows-x64.exe',

install_options => '/s',

      }#package

    }#if

  }#if

}#class


class jdk_uninstall {

  if $operatingsystem == 'windows' {

    if $architecture == 'x86' {

      package { 'Java SE Development Kit 8 Update 60':

ensure => absent,

source => '\\puppet\export\jdk-8u60-windows-i586.exe',

install_options => '/s',

      }#package

      package { 'Java 8 Update 60':

ensure => absent,

source => '\\puppet\export\jdk-8u60-windows-i586.exe',

install_options => '/s',

      }#package

    }#if

    if $architecture == 'x64' {

      package { 'Java SE Development Kit 8 Update 60':

ensure => absent,

source => '\\puppet\export\jdk-8u60-windows-x64.exe',

install_options => '/s',

      }#package

      package { 'Java 8 Update 60':

ensure => absent,

source => '\\puppet\export\jdk-8u60-windows-x64.exe',

install_options => '/s',

      }#package

    }#if

  }#if

}#class

 © Andrew Brehm 2016