The Windows module provides a selection of helpers for common administrative tasks.
In order to use the ifunky-windows module you will need to set some top level parameters that are used throughout the numerous classes.
Proxy Server
If you need to go through a proxy server then in your hiera data you should set the following:
windows::proxy_server: 'http://myproxyserver.net:3128'
Install Chocolatey which can optionally work through a proxy server.
If you've set the proxy base setting as described above then this class will create a chocolateyProxyLocation environment variable.
Example
class { windows::chocolatey : }
Parameters within windows::chocolatey
:
#####version
- Version of Chocolatey to install. Defaults to 0.9.9.11.
#####
timeout
- Timeout for the chocolatey installation. Defaults to 300 seconds (5 minutes)
Extracts winsxs zip file to a target folder.
windows::winsxs { 'ISO Source':
winsxs_folder => 'C:\iso_source',
winsxs_source_zip_url => 'http:://software/iso_source.zip',
}
Parameters within windows_winsxs
:
#####winsxs_folder
- Local folder to extract zip file, folder will be created if it doesn't exist
#####
winsxs_source_zip_url
- URL to zip file containing the target OS WinSxS source folders
Uses the native Windows unzip functionality for unzipping files.
windows::unzip { 'C:\zipfile.zip':
destination => 'C:\temp',
creates => 'C:\temp\fromzipfile.txt',
}
Installs the Java JDK or Java JRE. This module downloads the installers from a custom HTTP location which you need to populate with beforehand.
Example using the defaults to install the Java JDK V8.45.
class { windows::java:
arch => $::architecture,
type => 'jdk',
}
Parameters within windows_java
:
#####ensure
- present - Ensure package is installed
- absent - Ensure package is removed
#####
version
- Numeric major Java version number i.e. 8
#####
update
- Numeric update Java version number i.e. 45
#####
base_url
- String location of the root folder containing your Java installers i.e. http://yoursharedserver/software/java
#####
arch
- String - System architecture type x86|x64. Or use a fact $::architecture
#####
type
- String - Install JDK or JRE. Accepted values jre|jdk
Resource that manages the configuration and creation of websites. NOTE: If you want to use hash merging functionality across the hierarchy you'll need to set deeper merge on.
Parameters within windows::web::config
:
#####site_def_name
- Because hash merging can be used you may not want to merge everything so site_def_name is used to identify different hashes
Example Given you have some Hiera data to describe one or many websites:
---
[SITE_DEF_NAME]_websites:
mywebsite:
site_name: Website1
enable_32_bit: false
pipeline_mode: Integrated
runtime_version: v4.0
bindings:
-
port: 80
host_header:
ip_address: *
protocol: http
You can call create to kick off the creation:
class { 'windows::web::config':
site_def_name => '[SITE_DEF_NAME]'
}
Resource that creates a website based on some standards, this can be used to create one or many websites managed by Hiera data.
- The application pool will always have the same name as the website
- One or many bindings can be set at create time
Parameters within windows::web::createsite
:
#####site_name
- Name of the IIS site to create (required)
#####
enable_32_bit
- true | false - if the applicaiton pool should be 32bit. Defaults to false
#####
pipeline_mode
- Integrated | Classic - IIS pipeline mode. Defaults to Integrated
#####
runtime_version
- v4.0 | v2.0 - Dotnet runtime version. Defaults to v4.0
#####
root_web_folder
- Root folder of IIS i.e. c:\inetpub\wwwroot. New websites will be created inside this parent folder
#####
bindings
- Array of hashes representing bindings: bindings: - port: 80 host_header: ip_address: * protocol: http