windowspagefile
Version information
This version is compatible with:
- Puppet Enterprise 3.x
- Puppet 3.x
Start using this module
Add this module to your Puppetfile:
mod 'ptierno-windowspagefile', '1.2.2'
Learn more about managing modules with a PuppetfileDocumentation
windowspagefile
Table of Contents
- Overview
- Module Description - What the module does and why it is useful
- Setup - The basics of getting started with windowspagefile
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
- Contributing - Contribute to this modules development
Overview
A puppet type and provider to manage the creation/deletion/updation of windows pagefiles using WMI via ruby's win32ole.
Module Description
The provider is capable of setting the initial size and maximum size for a windows page file or it can let the page file size be managed by the operating system.
Setup
Installation
The module can be installed directly from the Puppet Forge
puppet module install ptierno-windowspagefile
Or you can clone this repo into your modulepath
git clone https://github.com/ptierno/puppet-windowspagefile.git
Usage
Examples
Managing a page files size
pagefile { 'c:\pagefile.sys':
initialsize => 1024,
maximumsize => 1024
}
Letting windows manage the page files size
pagefile { 'c:\pagefile.sys':
systemmanaged => true
}
Removing a page file
pagefile { 'c:\pagefile.sys':
ensure => absent
}
If you leave out either initialsize
or maximumsize
if will use the value of the other
# maximumsize will inherit the value of initialsize
pagefile { 'c:\pagefile.sys':
initialsize => 1024
}
If you use this module to manage a pagefile (or more), it will automatically disable the Windows option to have the system automatically manage pagefiles for all drives. (different than system managed size for a single pagefile)
If you set all of your managed pagefiles ensure
value to absent
it will turn this feature back on.
Limitations
This provider has been tested on the following windows operating systems:
- Windows Server 2008 R2
- Windows Server 2012 R2
Development
Please submit any issues using the github issue tracker
If you have any questions, feel free to contact me via email.
Peter Tierno peter.a.tierno@gmail.com
Contributing
- fork
- update
- pull request
- joy
License
Copyright (C) 2014 Peter Tierno
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Types in this module release
2015-02-11 - Bugfix Release 1.2.2
- Munge to lowercase if $::operatinsystemrelease =~ /2008/
- Munge to capitalize if $::operatingsystemrelease =~ /2012/
2014-09-17 - Release 1.2.1
- Add requirements to metadata.json
2014-09-02 - Release 1.2.0
- Enable
AutomaticManagedPageFile
when destroying a pagefile and theself.instances
count is 0 - Utilize
self.flush
in thecreate
method. - If
maximumsize
is not set it will inherit the value ofinitialsize
and vice versa. - Refactor some of the WMI interactions to use
to_enum
,find
, etc.
2014-08-12 - Release 1.1.0
- Use
Puppet::Util::Windows::ADSI
for wmi connections withPuppet::Util::ADSI
as a fallback for Puppet 3.7/PE 3.4 compatibility
2014-07-19 - Release 1.0.0
- Initial Commit
Copyright (C) 2014 Peter Tierno Peter Tierno can be contacted at: peter.a.tierno@gmail.com Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.