vmwaretools
Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x
- Puppet >=5.0.0 <7.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'CraigWatson1987-vmwaretools', '4.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-vmwaretools
Table of Contents
- Overview - What is the puppet-vmwaretools module?
- Module Description - What does the module do?
- Setup - The basics of getting started with puppet-vmwaretools
- Usage - Configuration options and additional functionality
- Reference - An under-the-hood peek at what the module is doing
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Overview
This module manages the installation and upgrade of VMware Tools via the source code tarballs distributed by VMware.
Module Description
This module is designed to replace both the OSP packages provided by VMware's repositories and also the open-vm-tools
package. The module is O/S independent (tested on Ubuntu and Red Hat systems).
The tarballs are transferred to the target by either HTTP download or Puppet filebucket (the default mechanism), and then uncompressed and installed via the archive's Perl installation script.
Upgrading of currently installed VMware Tools packages is also supported - the module obtains the currently-installed VMware Tools version via a custom fact, and only deploys the tarball if a version mismatch occurs or if VMware Tools is not installed on the target system.
Setup
What puppet-vmwaretools affects
- Compares installed version with the configured version via the
vmwaretools
fact - Transfer the VMware Tools archive to the target agent (via Puppet or HTTP)
- Untar the archive and run vmware-install-tools.pl (warning: this installer is run with the
-d
flag to accept all default answers). - Removes several packages, see params.pp for the complete list.
Setup Requirements
- Perl must be installed on the target systems in order to run the VMware Tools installer - installation of Perl is not handled by the module.
- Pluginsync must be enabled, due to the
vmwaretools_version
custom fact distributed with this module. If the module cannot access the fact, the Puppet run will fail. - As of version 1.0.0, the module requires the PuppetLabs stdlib module module to be available within your Puppet code.
Beginning with puppet-vmwaretools
To accept default class parameters:
include vmwaretools
Usage
The source distribution mechanism can be customised by declaring the module with archive_url
and archive_md5
parameters (default is to use Puppet filebuckets).
To specify a non-default version, working directory and HTTP URL (other variables can be viewed and/or modified in manifests/init.pp
):
class { 'vmwaretools':
version => '8.6.5-621624',
working_dir => '/tmp/vmwaretools',
archive_url => 'http://server.local/my/dir',
archive_md5 => '9df56c317ecf466f954d91f6c5ce8a6f',
}
To stop vmwaretools
from trying to install the development packages, Perl package, or curl package use the following paramters to disable their management with this module:
manage_dev_pkgs
set to false to prevent development packages being managedmanage_perl_pkgs
set to false to prevent Perl packages being managedmanage_curl_pkgs
set to false to prevent curl packages being managed
Reference
Facts
vmwaretools_version
- Detects any existing VMware Tools installations and, if found, reports the installed version.
esx_version
- Detects the underlying ESX version from
dmidecode
, thanks to François Deppierraz for the pull request!
Classes
vmwaretools::install::exec
- Declares all
exec
commands run by the module.
vmwaretools::install::package
- Handles installing the required tools to compile and install the archive, as well as purging OSP and open-source VMware Tools packages.
- NOTE: Due to bugs in Puppet's
yum
provider, the OSP/open-source packages are only marked asabsent
, notpurged
.
vmwaretools::install::archive
- Handles the archive distribution (either places a download script or the archive).
vmwaretools::params
- O/S-specific and module configuration (e.g. paths to binaries and a boolean variable to control file deployment)
vmwaretools::config_tools
- Executes
vmware-config-tools.pl -d
if thevmci.ko
module doesn't exist for the running kernel
vmwaretools::timesync
- Handles time synchronisation between the virtual machine and host
Limitations
Supported Operating Systems
- Ubuntu/Debian 14.04 and 16.04
- CentOS/RedHat 6 and 7
- SuSE/SLES
Development
- Copyright (C) 2013 to 2020 Craig Watson - craig@cwatson.org
- VMware Tools fact by janorn
- Distributed under the terms of the Apache License v2.0 - see LICENSE file for details.
- Please note that the module was licensed under the terms of the GNU General Public License v3 until commit fea91b58241481fc3fc4aa0e02996cc9ef0f131e
- Further contributions and testing reports are extremely welcome - please submit a pull request or issue on GitHub
- Testing environment kindly donated by Sleek Networks Ltd (An Adapt Company)
Change Log
4.0.0
2020-01-27 - Major Version Release
PDK: Now Supported
- This module is now compatible with the PDK
Class: vmwaretools::install::exec
Class: vmwaretools::params
- Piping
yes
to the installer does not work with VMware Tools >= 10.0 - this has been fixed by using-d -f
- reported in #86 by gabe-sky
3.0.1
2017-09-01 - Bugfix Release
Class: vmwaretools
- Fixing type regression for
$archive_md5
parameter
3.0.0
2017-03-10 - Major Version Release
Puppet 3 Support Removed
- This module no longer supports Puppet 3. If you require Puppet 3 functionality, please use version 2.4.1 from the Puppet Forge, or the puppet3 branch in Git.
2.4.1
2016-12-30 - Bugfix Release
Class: vmwaretools
- Fixing more stdlib deprecation warnings
## 2.4.0
2016-12-30 - Feature Release
Class: vmwaretools
- Fixing stdlib deprecation warnings
Fact: vmwaretools_version
2.3.0
2016-06-20 - Feature Release
#### Class: vmwaretools
- New parameter:
clean_failed_downloads
(default:false
). As requested in #80, setting this totrue
will cause the HTTP download script to remove the downloaded copy of the archive on failure. NOTE that this will be default totrue
in a future release.
Class: vmwaretools::params
- Majorly reworked logic for
deploy_files
to fully removeUnknown variable
warnings and odd deployment behaviour on Puppet 3. - Moved
download_vmwaretools
variable from main class
Class: vmwaretools::install::exec
- Do not require the
curl
package isvmwaretools::manage_curl_pkgs
isfalse
(possible dependency problem)
#### Template: download.sh.erb
- Adding failed download clean-up function
- Making the script slightly more glob-proof
Global
- Using top-scope everywhere within the module
2.2.3
### 2016-06-17 - Bugfix Release
Class: vmwaretools::params
- Changing logic behind
deploy_files
parameter to fixUnknown variable: 'deploy_files'
warnings
#### Global
- Fixing permissions issues reported in #81
2.2.2
2016-06-11 - Bugfix Release
#### Class: vmwaretools::install::package
- Now using stdlib's
ensure_packages
function rather than declaring packages manually to reduce the risk of collisions
2.2.1
2016-03-25 - Bugfix Release
Class: vmwaretools
- Fixing Puppet 4 issue with
undef
default value forcurl_proxy
parameter (new default -false
) - thanks dutsmiller for pull request #79
2.2.0
2016-03-14 - Feature Release
Class: vmwaretools
- New parameter:
curl_proxy
(default:undef
). This controls the passing of proxy options to the download.sh script - thanks dutsmiller for pull request #78
Template: download.sh.erb
- Optionally pass
-x
tocurl
2.1.2
2015-09-10 - Bugfix Release
Class: vmwaretools::params
2.1.1
2015-09-03 - Bugfix Release
Class: vmwaretools::params
- Adding packages to purge list, thanks to Juan José Presa for PR #73 (solves bug #72) - for full package list, see params.pp.
2.1.0
2015-08-15 - Feature Release
Class: vmwaretools
- New parameter:
ignore_autodetect
- this will allow bypassing of the autodetection mechanism that only runs the module on certain platforms. Only useful for testing, defaults tofalse
.
Fact: vmwaretools_version
- Removed the confine so that the fact now reports on non-VMware platforms.
2.0.1
2015-06-25 - Bugfix release
Class: vmwaretools::timesync
- Added dependency on Exec['vmware_config_tools'] if VMware Tools are being deployed this run - fixes #71
2.0.0
2015-05-14 - Major release
Class: vmwaretools
- Renamed
redhat_install_devel
parameter toinstall_devel
to support SuSE-based OS families.
Class: vmwaretools::params
- Added support for installing development tools on SuSE-based OS families.
Class: vmwaretools::install
- Moved working directory declaration into this subclass to cut down on logic sprawl.
- Changed "arrow" relationship to explicit
require
parameters.
Class: vmwaretools::config
- Removed.
1.4.1
### 2015-05-05 - Bug Fix
Fact: esx_version
- Updated
dmidecode
values and version numbers
1.4.0
2015-04-13 - Feature Release
Class: vmwaretools
- Added new
force_install
parameter to trigger echoing 'yes' to the VMware Tools install script. Thanks to Anthony Somerset and Mattias Geniar for the help with the issue!
Class: vmwaretools::params
- Adding new parameter
$install_command
to handle adding theecho
ifforce_install
is passed to the module.
Class: vmwaretools::install::exec
- Changed the
install_vmwaretools
exec resource to use the new$vmwaretools::params::install_command
variable.
Fact: esx_version
- Added ESXi 6 to the list
1.3.1
2015-02-09 - Bugfix Release
Class: vmwaretools
- Fixed bug where facter passing literal boolean was causing
str2bool
to fail - thanks to Arkadi Colson for reporting the bug!
1.3.0
2015-01-30 - Feature Release
Class: vmwaretools
- Added parameters to manage the installation of certain supporting packages - thanks to Aaron Hicks for Pull Request #60
Class: vmwaretools::install::package
- Adjusted class to use above parameters
1.2.0
2014-12-09 - Feature Release
Class: vmwaretools
- Added
prevent_upgrade
parameter to does not deploy files if the Puppet version is higher than the installed version) - Modified the regex for how to download vmwaretools to fix a Lint issue with the previous syntax
- Huge thanks to esalberg for Pull Request #58!
1.1.0
2014-10-02 - Feature Release
Class: vmwaretools::params
- Added
vmware-tools-foundation
to purge_package_list to fully remove OSP tools - thanks to Christian Groschupp - Added
purge_list_ensure
variable to work around bug in Puppet's yum provider, see these bugs: 1, 2, 3 - thanks to Justin T. for PR #53
Class: vmwaretools::install::package
- Implemented
purge_list_ensure
as per above bug-fix
#### Template: download.sh.erb
- Redirect error output to standard error, and exit early if the download fails - thanks to Christian Groschupp
Change Log
- Major overhaul and Markdown prettification!
Readme
- Minor Markdown formatting changes
1.0.1
2014-10-01 - Bugfix Release
Class: vmwaretools
- Fixed regression bug #51 caused by facts being returned as strings, using stdlib's str2bool function - thanks Justin T.!
1.0.0
2014-09-24 - Major Release
Module-wide changes
- This and all future versions of the module are now distributed under the Apache Licence v2.0! Previous versions are still licensed under the GNU General Public Licence v3.
- This module is now dependant on PuppetLabs' stdlib module. Please make sure this module is available within your Puppet codebase.
Fact: vmwaretools
- Fixes
vmwaretools
fact detection for failed tools installs - thanks Markus Frosch for pull request #49!
Class: vmwaretools
open-vm-tools
is nowpurged
rather than justabsent
- thanks Markus Frosch for pull request #49!
0.4.3
2014-09-08 - Bugfix Release
Class: vmwaretools
- We now only parse the module on Linux kernels, fixes ticket #47, thanks to thesysadm!
0.4.2
2014-08-06 - Bugfix Release
Class: vmwaretools::params
- Adding new parameter for RH 5.x PAE/xen kernels for kernel-devel package (thanks Mark Stunnenberg!)
- Adding new parameter for the list of packages to purge
Class: vmwaretools::install::package
- Only installing
build-essential
on Debian - pull request #43 - Changing RedHat
kernel-devel
package name to account for PAE/xen kernels on RH 5.x (thanks Mark Stunnenberg!) - Adding
open-vm-tools-desktop
to list of packages to purge
0.4.1
2014-06-20 - Bugfix Release
Class: vmwaretools
- Removing
config_creates
override - Documentation syntax correction - pull request #42
- Added check fof the
vmwaretools_version
fact - the module will hard-fail if this cannot be found
Class: vmwaretools::params
- Remvoing
config_creates
references
Class: vmwaretools::config_tools
- Replacing
creates
paramter with a more straightforwardunless
check using lsmod to check for the vmci kernel module that should be installed when vmware-config-tools.pl runs
0.4.0
2014-05-16 - Feature Release
#### Class: vmwaretools
- Improving support for downloading VMware Tools via external Puppet modules (thanks to Sam Keeley and Aedu for Pull Requests #36 and #37 respectively)
Class: vmwaretools::params
- Adding Ubuntu 10.04 LTC (Lucid Lynx) override for
config_creates_real
variable
0.3.1
2014-04-14 - Bugfix Release
Class: vmwaretools::params
- Correcting typo in config_creates assignment
0.3.0
2014-04-14 - Feature Release
Class: vmwaretools
main
- Adding
config_creates
parameter to main class declaration
Class: vmwaretools::params
- Renaming
config_creates
toconfig_creates_real
- Adding case statement for Ubuntu/Debian within the Debian osfamily case
Class: vmwaretools::config_tools
- Using vmwaretools::params::config_creates_real instead of vmwaretools::params::config_creates
0.2.5
2014-04-10 - Bugfix Release
Class: vmwaretools
- Facter facts are strings, not literal booleans!
0.2.4
2014-04-09 - Bugfix Release
Class: vmwaretools
- Fixing logic in init.pp to silently fail if the module is included on non-VMware hardware and the $fail_on_non_vmware parameter is not set to true (bug reported by Marcus Johansson by email - thanks!)
0.2.3
2014-04-07 - Bugfix Release
Class: vmwaretools::install::package
- We now remove the vmware-tools-services package as well as open-vm-tools - pull request #34 and packages are now purged rather than removed
Class: vmwaretools::params
config_creates
is now different across Debian and RedHat osfamilys - pull request #34
0.2.2
2014-03-05 - Bugfix Release
#### Class: vmwaretools::install
- Packages will now be purged/installed all the time, not just when we install VMware Tools -- raised by cdenneen in bug #27
#### Template: download.sh.erb
- Added removal of the archive on an MD5 mismatch - raised by herwigbogaert in bug #30
0.2.1
2013-10-31 - Feature Release (non-SemVer)
#### Fact: esx_version
- Adding support for vSphere 5.5. Thanks to Ryan McKern for the pull request GitHub Issue #18!
0.2.0
2013-09-11 - Feature Release
Fact: esx_version
- New fact: reports the version of vSphere.
Class: vmwaretools::timesync
- New class: Handles management of time sychronisation with vSphere. Thanks to Aaron Hicks for the pull request GitHub Issue #18!
Class: vmwaretools::config_tools
- Renamed class: was previously
vmwaretools::kernel_upgrade
Class: vmwaretools
- New parameter: timesync. This paramter enables/disables the timesync feature of the VMware Tools.
- Defaults to undef (literal), which will leave time synchronisation unmanaged.
- Valid managed values are true to enable timesync and false to disable timesync, both literal booleans.
0.1.2
2013-06-20 - Bugfix Release
Class: vmwaretools::params
- Moving back to
vmci.ko
- see discussion on GitHub Issue #14, huge thanks to Ryan McKern for the investigative work!
0.1.1
2013-06-19 - Bugfix Release
Readme
- Adding Ubuntu 13.04 to Unsupported Operating Systems
Class: vmwaretools
- Now fails when run on Ubuntu 13.04 (Raring)
Class: vmwaretools::kernel_upgrade
- Moving
creates
attribute to/lib/modules/${::kernelrelease}/kernel/drivers/scsi/vmw_pvscsi.ko
as suggested in bug #12
0.1.0
2013-05-17 - Feature Release
Fact: vmwaretools_version
- Added "not installed" output if VMware Tools isn't installed
Class: vmwaretools::kernel_upgrade
- New class: handles re-compiling VMware Tools following a kernel upgrade
Class: vmwaretools::install::package
- Installing
curl
if download script is used. - Adding
open-vm-dkms
to the list of purged packages - Making the
kernel-devel
package installation explicitly use the running kernel - pull request #8 by mattiasgeniar
Class: vmwaretools
- New parameter:
prevent_downgrade
, prevents downgrading if the version installed is newer than intended Puppet-deployed version (default:true
)
Template: download.sh.erb
- Using
awk
path fromvmwaretools::params
in script, and usingcurl
rather thanwget
- pull request #7 by mattiasgeniar
0.0.5
2013-05-07 - Bugfix Release
Class: vmwaretools::install::exec
archive_location
replaced byarchive_url
Class: vmwaretools
- Parameter Typo fixed
##0.0.4
2013-05-03
- Including new README format and starting Changelogs.
Dependencies
- puppetlabs/stdlib (>=2.2.0)
Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] 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.