FAQ

On Tue, Oct 16, 2012 at 5:45 AM, wukong wrote:

Also is there a way to do this as silent install?

Here is my manifest.

package {"java" :
ensure => installed,
provider => "windows",
source => "C:/Manifests/installables/jdk-6u35-windows-i586.exe",
}
Launching that .exe will always give you a GUI, unless you provide
some additional arguments. To install the JRE silently, see the
following: http://www.oracle.com/technetwork/java/javase/silent-136552.html#running.

Regards,

Matt.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Search Discussions

  • Wukong at Oct 16, 2012 at 2:06 pm
    Hi guys,
    I have been trying to bootstrap a windows machine with puppet. I need to
    install java and setup the JAVA_HOME and add bin to the path variable of
    windows.
    I have tried using the package resource with the jdk setup but everytime I
    run the manifest puppet opens the setup wizard and waits for me to do
    something.
    Am I doing something wrong or is this the right behavior? Also is there a
    way to do this as silent install?

    Here is my manifest.

    package {"java" :
    ensure => installed,
    provider => "windows",
    source => "C:/Manifests/installables/jdk-6u35-windows-i586.exe",
    }

    Thank you.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/h75UozzbWpAJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Corey Osman at Oct 16, 2012 at 9:33 pm
    I wasn't aware that you could use the package resource for exe files since
    it looked like it was limited to msi files.

    I ended up crafting up this solution using exec resource

    exec{"jdkinstaller":
    command => "${::installer_dir}/jdk-6u30-windows-i586.exe /s
    ADDLOCAL=\"ToolsFeature,DemosFeature,SourceFeature\" ",
    creates => 'C:\Program Files\Java\jdk1.6.0_30\bin\javac.exe',
    logoutput => 'true',
    }

    Still struggling to set the Global PATH variable in a nice way.

    Corey
    On Monday, October 15, 2012 11:45:25 PM UTC-5, wukong wrote:

    Hi guys,
    I have been trying to bootstrap a windows machine with puppet. I need to
    install java and setup the JAVA_HOME and add bin to the path variable of
    windows.
    I have tried using the package resource with the jdk setup but everytime I
    run the manifest puppet opens the setup wizard and waits for me to do
    something.
    Am I doing something wrong or is this the right behavior? Also is there a
    way to do this as silent install?

    Here is my manifest.

    package {"java" :
    ensure => installed,
    provider => "windows",
    source => "C:/Manifests/installables/jdk-6u35-windows-i586.exe",
    }

    Thank you.
    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/IJlOOM-dRZUJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Paul Tötterman at Oct 19, 2012 at 10:55 am
    Hi,

    Still struggling to set the Global PATH variable in a nice way.

    I set the path using PowerShell (a script which is deployed and executed by
    puppet), but I imagine you could do something similar with ruby and the
    win32 api:

    Function Set-Path {
    Param([Parameter(Mandatory=$true)][string]$component,
    [Parameter(Mandatory=$false)][string]$variable='path',
    [Parameter(Mandatory=$false)][string]$target='Machine')

    $path = [Environment]::GetEnvironmentVariable($variable,
    $target).split(';')

    if ($path -notcontains $component) {
    $path += $component

    [Environment]::SetEnvironmentVariable($variable,
    [string]::join(';', $path),
    $target)
    }
    }

    Cheers,
    Paul

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/8eWtz9QMboIJ.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
  • Josh Cooper at Oct 16, 2012 at 6:08 pm

    On Tue, Oct 16, 2012 at 6:14 AM, Matthew Burgess wrote:
    On Tue, Oct 16, 2012 at 5:45 AM, wukong wrote:

    Also is there a way to do this as silent install?

    Here is my manifest.

    package {"java" :
    ensure => installed,
    provider => "windows",
    source => "C:/Manifests/installables/jdk-6u35-windows-i586.exe",
    }
    Launching that .exe will always give you a GUI, unless you provide
    some additional arguments. To install the JRE silently, see the
    following: http://www.oracle.com/technetwork/java/javase/silent-136552.html#running.

    Regards,

    Matt.

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
    Having done this recently, I'd recommend something like the following:

    package { 'Java(TM) 7 Update 5':
    ensure => installed,
    source => '<path>/jre-7u5-windows-i586.exe',
    install_options => [
    '/s', '/v/qn" ADDLOCAL=jrecore REBOOT=Suppress JAVAUPDATE=0"'
    ]
    }

    Note the name of the package needs to match 'DisplayName' as specified
    in the registry and displayed in Add/Remove programs.

    As for customizing the PATH, this is filed as
    https://projects.puppetlabs.com/issues/16048 and there's some
    background information here
    https://groups.google.com/forum/?fromgroups=#!topic/puppet-users/68ebrAEUzgQ

    Josh

    --
    Josh Cooper
    Developer, Puppet Labs

    --
    You received this message because you are subscribed to the Google Groups "Puppet Users" group.
    To post to this group, send email to puppet-users@googlegroups.com.
    To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedOct 16, '12 at 1:14p
activeOct 19, '12 at 10:55a
posts5
users5
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase