├── .puppet-lint.rc ├── .yardopts ├── .rspec_parallel ├── .rspec ├── .gitattributes ├── .vscode └── extensions.json ├── spec ├── classes │ ├── coverage_spec.rb │ └── vmwaretools_spec.rb ├── default_facts.yml └── spec_helper.rb ├── .fixtures.yaml ├── .pmtignore ├── .github ├── PULL_REQUEST_TEMPLATE.md ├── ISSUE_TEMPLATE.md └── CONTRIBUTING.md ├── .gitignore ├── .pdkignore ├── .gemfile ├── lib └── facter │ ├── vmwaretools_version.rb │ └── esx_version.rb ├── manifests ├── config_tools.pp ├── install.pp ├── timesync.pp ├── install │ ├── archive.pp │ ├── package.pp │ └── exec.pp ├── params.pp └── init.pp ├── .travis.yml ├── .gitlab-ci.yml ├── metadata.json ├── appveyor.yml ├── .overcommit.yml ├── templates └── download.sh.erb ├── Gemfile ├── Rakefile ├── .rubocop.yml ├── README.md ├── .gemfile.lock ├── LICENSE └── CHANGELOG.md /.puppet-lint.rc: -------------------------------------------------------------------------------- 1 | --relative 2 | -------------------------------------------------------------------------------- /.yardopts: -------------------------------------------------------------------------------- 1 | --markup markdown 2 | -------------------------------------------------------------------------------- /.rspec_parallel: -------------------------------------------------------------------------------- 1 | --format progress 2 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --color 2 | --format documentation 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.rb eol=lf 2 | *.erb eol=lf 3 | *.pp eol=lf 4 | *.sh eol=lf 5 | *.epp eol=lf 6 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "jpogran.puppet-vscode", 4 | "rebornix.Ruby" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /spec/classes/coverage_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rspec-puppet' 2 | 3 | at_exit { RSpec::Puppet::Coverage.report! } 4 | # vim: syntax=ruby 5 | -------------------------------------------------------------------------------- /.fixtures.yaml: -------------------------------------------------------------------------------- 1 | fixtures: 2 | symlinks: 3 | vmwaretools: "#{source_dir}" 4 | repositories: 5 | stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib" 6 | -------------------------------------------------------------------------------- /spec/default_facts.yml: -------------------------------------------------------------------------------- 1 | # Use default_module_facts.yml for module specific facts. 2 | # 3 | # Facts specified here will override the values provided by rspec-puppet-facts. 4 | --- 5 | ipaddress: "172.16.254.254" 6 | ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" 7 | is_pe: false 8 | macaddress: "AA:AA:AA:AA:AA:AA" 9 | -------------------------------------------------------------------------------- /.pmtignore: -------------------------------------------------------------------------------- 1 | docs/ 2 | pkg/ 3 | Gemfile.lock 4 | Gemfile.local 5 | vendor/ 6 | .vendor/ 7 | spec/fixtures/manifests/ 8 | spec/fixtures/modules/ 9 | .vagrant/ 10 | .bundle/ 11 | .ruby-version 12 | coverage/ 13 | log/ 14 | .idea/ 15 | .dependencies/ 16 | .librarian/ 17 | Puppetfile.lock 18 | *.iml 19 | .*.sw? 20 | .yardoc/ 21 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .*.sw[op] 3 | .metadata 4 | .yardoc 5 | .yardwarns 6 | *.iml 7 | /.bundle/ 8 | /.idea/ 9 | /.vagrant/ 10 | /coverage/ 11 | /bin/ 12 | /doc/ 13 | /Gemfile.local 14 | /Gemfile.lock 15 | /junit/ 16 | /log/ 17 | /pkg/ 18 | /spec/fixtures/manifests/ 19 | /spec/fixtures/modules/ 20 | /tmp/ 21 | /vendor/ 22 | /convert_report.txt 23 | /update_report.txt 24 | .DS_Store 25 | .project 26 | .envrc 27 | /inventory.yaml 28 | -------------------------------------------------------------------------------- /.pdkignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | .*.sw[op] 3 | .metadata 4 | .yardoc 5 | .yardwarns 6 | *.iml 7 | /.bundle/ 8 | /.idea/ 9 | /.vagrant/ 10 | /coverage/ 11 | /bin/ 12 | /doc/ 13 | /Gemfile.local 14 | /Gemfile.lock 15 | /junit/ 16 | /log/ 17 | /pkg/ 18 | /spec/fixtures/manifests/ 19 | /spec/fixtures/modules/ 20 | /tmp/ 21 | /vendor/ 22 | /convert_report.txt 23 | /update_report.txt 24 | .DS_Store 25 | .project 26 | .envrc 27 | /inventory.yaml 28 | /appveyor.yml 29 | /.fixtures.yml 30 | /Gemfile 31 | /.gitattributes 32 | /.gitignore 33 | /.gitlab-ci.yml 34 | /.pdkignore 35 | /Rakefile 36 | /rakelib/ 37 | /.rspec 38 | /.rubocop.yml 39 | /.travis.yml 40 | /.yardopts 41 | /spec/ 42 | /.vscode/ 43 | -------------------------------------------------------------------------------- /.gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | group :test do 4 | gem "rake", '< 12.0.0' 5 | gem "puppet", ENV['PUPPET_VERSION'] || '~> 4.6.1' 6 | gem 'safe_yaml', '~> 1.0.4' 7 | gem "puppet-lint", '2.0.2' 8 | gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git' 9 | gem "puppet-syntax" 10 | gem "puppetlabs_spec_helper" 11 | gem 'json_pure', '< 2.0.0' 12 | gem 'json', '< 2.0.0' 13 | gem 'xmlrpc', :require => false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.4.0') 14 | end 15 | 16 | group :development do 17 | gem "travis" 18 | gem "travis-lint" 19 | gem "beaker" 20 | gem "beaker-rspec" 21 | gem "vagrant-wrapper" 22 | gem "puppet-blacksmith" 23 | gem "guard-rake" 24 | end 25 | -------------------------------------------------------------------------------- /lib/facter/vmwaretools_version.rb: -------------------------------------------------------------------------------- 1 | # Fact written by janorn 2 | # Reference: https://github.com/janorn/puppet-vmwaretools/blob/master/lib/facter/vmwaretools.rb 3 | 4 | require 'facter' 5 | 6 | Facter.add(:vmwaretools_version) do 7 | setcode do 8 | if File.executable?('/usr/bin/vmware-toolbox-cmd') 9 | result = Facter::Util::Resolution.exec('/usr/bin/vmware-toolbox-cmd -v') 10 | if result 11 | version = result.sub(%r{(\d*\.\d*\.\d*)\.\d*\s+\(build(-\d*)\)}, '\1\2') 12 | if version.empty? || version.nil? 13 | 'unknown' 14 | else 15 | version 16 | end 17 | else 18 | 'not installed' 19 | end 20 | else 21 | 'not installed' 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | ## Affected Puppet, Ruby, OS and module versions/distributions 12 | 13 | - Puppet: 14 | - Ruby: 15 | - Distribution: 16 | - Module version: 17 | 18 | ## How to reproduce (e.g Puppet code you use) 19 | 20 | ## What are you seeing 21 | 22 | ## What behaviour did you expect instead 23 | 24 | ## Output log 25 | 26 | ## Any additional information you'd like to impart 27 | -------------------------------------------------------------------------------- /manifests/config_tools.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::config_tools 2 | # 3 | # This class handles running the 'vmware-config-tools' command. 4 | # 5 | # == Actions: 6 | # 7 | # Executes '/usr/bin/vmware-config-tools.pl -d' 8 | # 9 | # === Authors: 10 | # 11 | # Craig Watson 12 | # 13 | # === Copyright: 14 | # 15 | # Copyright (C) Craig Watson 16 | # Published under the Apache License v2.0 17 | # 18 | class vmwaretools::config_tools { 19 | 20 | if $::vmwaretools::params::deploy_files { 21 | Exec['vmware_config_tools'] { 22 | require => Exec['clean_vmwaretools'], 23 | } 24 | } 25 | 26 | exec { 'vmware_config_tools': 27 | command => '/usr/bin/vmware-config-tools.pl -d', 28 | unless => '/sbin/lsmod | /bin/grep -q vmci', 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /manifests/install.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::install 2 | # 3 | # Top-level vmwaretools installation class 4 | # 5 | # == Actions: 6 | # 7 | # Includes the archive/package/exec installation submodules 8 | # 9 | # === Authors: 10 | # 11 | # Craig Watson 12 | # 13 | # === Copyright: 14 | # 15 | # Copyright (C) Craig Watson 16 | # Published under the Apache License v2.0 17 | # 18 | class vmwaretools::install { 19 | 20 | include ::vmwaretools::install::package 21 | 22 | if $::vmwaretools::params::deploy_files == true { 23 | 24 | file { $::vmwaretools::working_dir: 25 | ensure => directory, 26 | owner => 'root', 27 | group => 'root', 28 | mode => '0700', 29 | } 30 | 31 | class { '::vmwaretools::install::archive': 32 | require => [Class['::vmwaretools::install::package'],File[$::vmwaretools::working_dir]], 33 | } 34 | 35 | class { '::vmwaretools::install::exec': 36 | require => Class['::vmwaretools::install::archive'], 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | --- 2 | dist: xenial 3 | language: ruby 4 | cache: bundler 5 | before_install: 6 | - bundle -v 7 | - rm -f Gemfile.lock 8 | - gem update --system $RUBYGEMS_VERSION 9 | - gem --version 10 | - bundle -v 11 | script: 12 | - 'bundle exec rake $CHECK' 13 | bundler_args: --without system_tests 14 | rvm: 15 | - 2.5.3 16 | stages: 17 | - static 18 | - spec 19 | - acceptance 20 | - 21 | if: tag =~ ^v\d 22 | name: deploy 23 | matrix: 24 | fast_finish: true 25 | include: 26 | - 27 | env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint" 28 | stage: static 29 | - 30 | env: PUPPET_GEM_VERSION="~> 5.0" CHECK=parallel_spec 31 | rvm: 2.4.5 32 | stage: spec 33 | - 34 | env: PUPPET_GEM_VERSION="~> 6.0" CHECK=parallel_spec 35 | rvm: 2.5.3 36 | stage: spec 37 | - 38 | env: DEPLOY_TO_FORGE=yes 39 | stage: deploy 40 | branches: 41 | only: 42 | - master 43 | - /^v\d/ 44 | notifications: 45 | email: false 46 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | --- 2 | stages: 3 | - syntax 4 | - unit 5 | 6 | cache: 7 | paths: 8 | - vendor/bundle 9 | 10 | before_script: 11 | - bundle -v 12 | - rm Gemfile.lock || true 13 | - gem update --system $RUBYGEMS_VERSION 14 | - gem --version 15 | - bundle -v 16 | - bundle install --without system_tests --path vendor/bundle --jobs $(nproc) 17 | 18 | syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop-Ruby 2.5.3-Puppet ~> 6: 19 | stage: syntax 20 | image: ruby:2.5.3 21 | script: 22 | - bundle exec rake syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop 23 | variables: 24 | PUPPET_GEM_VERSION: '~> 6' 25 | 26 | parallel_spec-Ruby 2.5.3-Puppet ~> 6: 27 | stage: unit 28 | image: ruby:2.5.3 29 | script: 30 | - bundle exec rake parallel_spec 31 | variables: 32 | PUPPET_GEM_VERSION: '~> 6' 33 | 34 | parallel_spec-Ruby 2.4.5-Puppet ~> 5: 35 | stage: unit 36 | image: ruby:2.4.5 37 | script: 38 | - bundle exec rake parallel_spec 39 | variables: 40 | PUPPET_GEM_VERSION: '~> 5' 41 | 42 | -------------------------------------------------------------------------------- /manifests/timesync.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::timesync 2 | # 3 | # This class handles synchronising the node's clock with vSphere 4 | # 5 | # == Actions: 6 | # 7 | # Either enables or disables timesync 8 | # 9 | # === Authors: 10 | # 11 | # Craig Watson 12 | # 13 | # === Copyright: 14 | # 15 | # Copyright (C) Craig Watson 16 | # Published under the Apache License v2.0 17 | # 18 | class vmwaretools::timesync { 19 | 20 | case $::vmwaretools::timesync { 21 | true: { 22 | $cmd_action = 'enable' 23 | $cmd_grep = 'Disabled' 24 | } 25 | 26 | false: { 27 | $cmd_action = 'disable' 28 | $cmd_grep = 'Enabled' 29 | } 30 | 31 | default: { 32 | fail "Unsupported value ${::vmwaretools::timesync} for ::vmwaretools::timesync" 33 | } 34 | } 35 | 36 | if $::vmwaretools::params::deploy_files == true { 37 | Exec["vmwaretools_timesync_${cmd_action}"] { 38 | require => Exec['vmware_config_tools'], 39 | } 40 | } 41 | 42 | exec { "vmwaretools_timesync_${cmd_action}": 43 | command => "/usr/bin/vmware-toolbox-cmd timesync ${cmd_action}", 44 | onlyif => "/usr/bin/vmware-toolbox-cmd timesync status | grep ${cmd_grep}", 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /lib/facter/esx_version.rb: -------------------------------------------------------------------------------- 1 | require 'facter' 2 | 3 | # Author: Francois Deppierraz 4 | # Idea and address/version mapping comes from 5 | # http://virtwo.blogspot.ch/2010/10/which-esx-version-am-i-running-on.html 6 | 7 | Facter.add(:esx_version) do 8 | confine 'virtual' => 'vmware' 9 | setcode do 10 | if File.executable?('/usr/sbin/dmidecode') 11 | result = Facter::Util::Resolution.exec('/usr/sbin/dmidecode 2>&1') 12 | if result 13 | begin 14 | bios_address = %r{^BIOS Information$.+?Address: (0x[0-9A-F]{5})$}m.match(result)[1] 15 | 16 | case bios_address 17 | when '0xE8480' 18 | '2.5' 19 | when '0xE7C70' 20 | '3.0' 21 | when '0xE66C0' 22 | '3.5' 23 | when '0xEA550' 24 | '4.0' 25 | when '0xEA2E0' 26 | '4.1' 27 | when '0xE72C0' 28 | '5.0' 29 | when '0xEA0C0' 30 | '5.1' 31 | when '0xE9AB0' 32 | '5.1 update 3' 33 | when '0xEA050' 34 | '5.5' 35 | when '0xE9A40' 36 | '6.0' 37 | when '0xE99E0' 38 | '6.0 update 2' 39 | when '0xEA580' 40 | '6.5' 41 | else 42 | "Unknown, please report #{bios_address}" 43 | end 44 | rescue 45 | 'n/a' 46 | end 47 | end 48 | end 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CraigWatson1987-vmwaretools", 3 | "version": "4.0.0", 4 | "author": "Craig Watson", 5 | "summary": "Manage installation of VMware Tools via the archive distributed with vSphere, either via Puppet or HTTP.", 6 | "license": "Apache-2.0", 7 | "source": "git://github.com/craigwatson/puppet-vmwaretools.git", 8 | "project_page": "https://github.com/craigwatson/puppet-vmwaretools", 9 | "issues_url": "https://github.com/craigwatson/puppet-vmwaretools/issues", 10 | "dependencies": [ 11 | { 12 | "name": "puppetlabs/stdlib", 13 | "version_requirement": ">=2.2.0" 14 | } 15 | ], 16 | "operatingsystem_support": [ 17 | { 18 | "operatingsystem": "RedHat", 19 | "operatingsystemrelease": [ 20 | "6.0", 21 | "7.0" 22 | ] 23 | }, 24 | { 25 | "operatingsystem": "Ubuntu", 26 | "operatingsystemrelease": [ 27 | "18.04", 28 | "16.04", 29 | "14.04" 30 | ] 31 | } 32 | ], 33 | "requirements": [ 34 | { 35 | "name": "puppet", 36 | "version_requirement": ">=5.0.0 <7.0.0" 37 | } 38 | ], 39 | "description": "Manage installation of VMware Tools via the archive distributed with vSphere, either via Puppet or HTTP.", 40 | "tags": [ 41 | "vmware", 42 | "tools", 43 | "vmwaretools", 44 | "vsphere", 45 | "esx", 46 | "esxi" 47 | ], 48 | "pdk-version": "1.15.0", 49 | "template-url": "pdk-default#1.15.0", 50 | "template-ref": "tags/1.15.0-0-g0bc522e" 51 | } 52 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 1.1.x.{build} 3 | branches: 4 | only: 5 | - master 6 | - release 7 | skip_commits: 8 | message: /^\(?doc\)?.*/ 9 | clone_depth: 10 10 | init: 11 | - SET 12 | - 'mkdir C:\ProgramData\PuppetLabs\code && exit 0' 13 | - 'mkdir C:\ProgramData\PuppetLabs\facter && exit 0' 14 | - 'mkdir C:\ProgramData\PuppetLabs\hiera && exit 0' 15 | - 'mkdir C:\ProgramData\PuppetLabs\puppet\var && exit 0' 16 | environment: 17 | matrix: 18 | - 19 | RUBY_VERSION: 24-x64 20 | CHECK: syntax lint metadata_lint check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop 21 | - 22 | PUPPET_GEM_VERSION: ~> 5.0 23 | RUBY_VERSION: 24 24 | CHECK: parallel_spec 25 | - 26 | PUPPET_GEM_VERSION: ~> 5.0 27 | RUBY_VERSION: 24-x64 28 | CHECK: parallel_spec 29 | - 30 | PUPPET_GEM_VERSION: ~> 6.0 31 | RUBY_VERSION: 25 32 | CHECK: parallel_spec 33 | - 34 | PUPPET_GEM_VERSION: ~> 6.0 35 | RUBY_VERSION: 25-x64 36 | CHECK: parallel_spec 37 | matrix: 38 | fast_finish: true 39 | install: 40 | - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% 41 | - bundle install --jobs 4 --retry 2 --without system_tests 42 | - type Gemfile.lock 43 | build: off 44 | test_script: 45 | - bundle exec puppet -V 46 | - ruby -v 47 | - gem -v 48 | - bundle -v 49 | - bundle exec rake %CHECK% 50 | notifications: 51 | - provider: Email 52 | to: 53 | - nobody@nowhere.com 54 | on_build_success: false 55 | on_build_failure: false 56 | on_build_status_changed: false 57 | -------------------------------------------------------------------------------- /.overcommit.yml: -------------------------------------------------------------------------------- 1 | # Managed by https://github.com/voxpupuli/modulesync_configs 2 | # 3 | # Hooks are only enabled if you take action. 4 | # 5 | # To enable the hooks run: 6 | # 7 | # ``` 8 | # bundle exec overcommit --install 9 | # # ensure .overcommit.yml does not harm to you and then 10 | # bundle exec overcommit --sign 11 | # ``` 12 | # 13 | # (it will manage the .git/hooks directory): 14 | # 15 | # Examples howto skip a test for a commit or push: 16 | # 17 | # ``` 18 | # SKIP=RuboCop git commit 19 | # SKIP=PuppetLint git commit 20 | # SKIP=RakeTask git push 21 | # ``` 22 | # 23 | # Don't invoke overcommit at all: 24 | # 25 | # ``` 26 | # OVERCOMMIT_DISABLE=1 git commit 27 | # ``` 28 | # 29 | # Read more about overcommit: https://github.com/brigade/overcommit 30 | # 31 | # To manage this config yourself in your module add 32 | # 33 | # ``` 34 | # .overcommit.yml: 35 | # unmanaged: true 36 | # ``` 37 | # 38 | # to your modules .sync.yml config 39 | --- 40 | PreCommit: 41 | RuboCop: 42 | enabled: true 43 | description: 'Runs rubocop on modified files only' 44 | command: ['bundle', 'exec', 'rubocop'] 45 | PuppetLint: 46 | enabled: true 47 | description: 'Runs puppet-lint on modified files only' 48 | command: ['bundle', 'exec', 'puppet-lint'] 49 | YamlSyntax: 50 | enabled: true 51 | JsonSyntax: 52 | enabled: true 53 | TrailingWhitespace: 54 | enabled: true 55 | 56 | PrePush: 57 | RakeTarget: 58 | enabled: true 59 | description: 'Run rake targets' 60 | targets: 61 | - 'test' 62 | - 'rubocop' 63 | command: [ 'bundle', 'exec', 'rake' ] 64 | -------------------------------------------------------------------------------- /templates/download.sh.erb: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | # Published under the Apache License v2.0 4 | # Copyright (c) Craig Watson 5 | 6 | function check_exec { 7 | if [ ! -x $1 ]; then 8 | echo "$1 not found" 9 | exit 1 10 | fi 11 | } 12 | 13 | function clean_download { 14 | if [ ${CLEAN_FAILED_DOWNLOAD} -eq 1 ]; then 15 | if [ -f "${DOWNLOAD_LOCATION}" ]; then 16 | echo "Removing downloaded archive." >&2 17 | rm "${DOWNLOAD_LOCATION}" 18 | fi 19 | fi 20 | } 21 | 22 | DOWNLOAD_URL="<%= scope['::vmwaretools::archive_url'] %>/VMwareTools-<%= scope['::vmwaretools::version'] %>.tar.gz" 23 | DOWNLOAD_LOCATION="<%= scope['::vmwaretools::working_dir'] %>/VMwareTools-<%= scope['::vmwaretools::version'] %>.tar.gz" 24 | GOOD_CHECKSUM="<%= scope['::vmwaretools::archive_md5'] %>" 25 | CLEAN_FAILED_DOWNLOAD=<%= scope['::vmwaretools::params::clean_failed'] %> 26 | 27 | check_exec "/usr/bin/curl" 28 | check_exec "/usr/bin/md5sum" 29 | check_exec "<%= scope['::vmwaretools::params::awk_path'] %>" 30 | 31 | /usr/bin/curl -s "${DOWNLOAD_URL}" -o "${DOWNLOAD_LOCATION}"<% if scope['::vmwaretools::curl_proxy'] -%> -x <%= scope['::vmwaretools::curl_proxy'] %><% end %> 32 | 33 | if [ $? -gt 0 ]; then 34 | echo "Download failed from url ${DOWNLOAD_URL}" >&2 35 | clean_download 36 | exit 1 37 | fi 38 | 39 | chmod 600 ${DOWNLOAD_LOCATION} 40 | 41 | DOWNLOADED_CHECKSUM=$(/usr/bin/md5sum "${DOWNLOAD_LOCATION}" | <%= scope['::vmwaretools::params::awk_path'] %> '{ print $1 }') 42 | 43 | if [ "${DOWNLOADED_CHECKSUM}" != "${GOOD_CHECKSUM}" ]; then 44 | echo "Checksum mismatch. Got ${DOWNLOADED_CHECKSUM}, should have been ${GOOD_CHECKSUM}." >&2 45 | clean_download 46 | exit 1 47 | else 48 | exit 0 49 | fi 50 | -------------------------------------------------------------------------------- /manifests/install/archive.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::install::archive 2 | # 3 | # This class handles the placing the archive. 4 | # 5 | # == Actions: 6 | # 7 | # * Either via: 8 | # - HTTP, with an md5 checksum comparison 9 | # - Puppet filebucket 10 | # 11 | # === Authors: 12 | # 13 | # Craig Watson 14 | # 15 | # === Copyright: 16 | # 17 | # Copyright (C) Craig Watson 18 | # Published under the Apache License v2.0 19 | # 20 | class vmwaretools::install::archive { 21 | 22 | file { "${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz": 23 | mode => '0600', 24 | owner => 'root', 25 | group => 'root', 26 | require => File[$::vmwaretools::working_dir], 27 | } 28 | 29 | if $::vmwaretools::archive_url == 'puppet' { 30 | 31 | File["${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz"] { 32 | ensure => file, 33 | source => "puppet:///modules/vmwaretools/VMwareTools-${::vmwaretools::version}.tar.gz", 34 | notify => Exec['uncompress_vmwaretools'], 35 | } 36 | 37 | } elsif $::vmwaretools::archive_url =~ /^puppet:\/\// { 38 | 39 | File["${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz"] { 40 | ensure => file, 41 | source => "${::vmwaretools::archive_url}/VMwareTools-${::vmwaretools::version}.tar.gz", 42 | notify => Exec['uncompress_vmwaretools'], 43 | } 44 | 45 | } else { 46 | file { "${::vmwaretools::working_dir}/download.sh": 47 | content => template('vmwaretools/download.sh.erb'), 48 | owner => 'root', 49 | group => 'root', 50 | mode => '0700', 51 | notify => Exec['download_vmwaretools'], 52 | require => File[$::vmwaretools::working_dir]; 53 | } 54 | 55 | } 56 | 57 | } 58 | -------------------------------------------------------------------------------- /spec/spec_helper.rb: -------------------------------------------------------------------------------- 1 | require 'puppetlabs_spec_helper/module_spec_helper' 2 | require 'rspec-puppet-facts' 3 | 4 | require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb')) 5 | 6 | include RspecPuppetFacts 7 | 8 | default_facts = { 9 | puppetversion: Puppet.version, 10 | facterversion: Facter.version, 11 | } 12 | 13 | default_fact_files = [ 14 | File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')), 15 | File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')), 16 | ] 17 | 18 | default_fact_files.each do |f| 19 | next unless File.exist?(f) && File.readable?(f) && File.size?(f) 20 | 21 | begin 22 | default_facts.merge!(YAML.safe_load(File.read(f), [], [], true)) 23 | rescue => e 24 | RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}" 25 | end 26 | end 27 | 28 | # read default_facts and merge them over what is provided by facterdb 29 | default_facts.each do |fact, value| 30 | add_custom_fact fact, value 31 | end 32 | 33 | RSpec.configure do |c| 34 | c.default_facts = default_facts 35 | c.before :each do 36 | # set to strictest setting for testing 37 | # by default Puppet runs at warning level 38 | Puppet.settings[:strict] = :warning 39 | end 40 | c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT'] 41 | c.after(:suite) do 42 | end 43 | end 44 | 45 | # Ensures that a module is defined 46 | # @param module_name Name of the module 47 | def ensure_module_defined(module_name) 48 | module_name.split('::').reduce(Object) do |last_module, next_module| 49 | last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false) 50 | last_module.const_get(next_module, false) 51 | end 52 | end 53 | 54 | # 'spec_overrides' from sync.yml will appear below this line 55 | -------------------------------------------------------------------------------- /manifests/install/package.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::install::package 2 | # 3 | # This class handles VMware Tools package-related installation duties 4 | # 5 | # == Actions: 6 | # 7 | # * Ensures open-vm-tools is absent - this module directly conflicts. 8 | # * Installs Perl if it hasn't been installed by another module 9 | # * Installs curl if we're using the download script 10 | # * If we're running on a Debian system, install kernel headers and build tools 11 | # * On a Red Hat system and we really want to install kernel headers, do it. 12 | # * Purges VMware Tools OSP packages 13 | # 14 | # === Authors: 15 | # 16 | # Craig Watson 17 | # 18 | # === Copyright: 19 | # 20 | # Copyright (C) Craig Watson 21 | # Published under the Apache License v2.0 22 | # 23 | class vmwaretools::install::package { 24 | 25 | ensure_packages([$::vmwaretools::params::purge_package_list], {'ensure' => $::vmwaretools::params::purge_package_ensure}) 26 | 27 | if $::vmwaretools::manage_perl_pkgs == true { 28 | ensure_packages(['perl'], {'ensure' => 'present'}) 29 | } 30 | 31 | if ($::vmwaretools::manage_curl_pkgs == true) and ($::vmwaretools::params::download_vmwaretools == true) { 32 | ensure_packages(['curl'], {'ensure' => 'present'}) 33 | } 34 | 35 | if $::vmwaretools::manage_dev_pkgs == true { 36 | case $facts['os']['family'] { 37 | 'Debian' : { 38 | case $facts['os']['name'] { 39 | 'Ubuntu' : { 40 | ensure_packages(['build-essential',"linux-headers-${facts[kernelrelease]}"], {'ensure' => 'present'}) 41 | } 42 | 'Debian' : { 43 | ensure_packages(["linux-headers-${facts[kernelrelease]}"], {'ensure' => 'present'}) 44 | } 45 | default : { fail "${facts[os][name]} not supported yet." } 46 | } 47 | } 48 | 49 | 'RedHat' : { 50 | if $::vmwaretools::install_devel == true { 51 | ensure_packages([$vmwaretools::params::redhat_devel_package,'gcc'], {'ensure' => 'present'}) 52 | } 53 | } 54 | 55 | 'Suse' : { 56 | if $::vmwaretools::install_devel == true { 57 | ensure_packages(['kernel-source','gcc'], {'ensure' => 'present'}) 58 | } 59 | } 60 | 61 | default : { fail "${facts[os][family]} not supported yet." } 62 | } 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /spec/classes/vmwaretools_spec.rb: -------------------------------------------------------------------------------- 1 | require 'spec_helper' 2 | 3 | default_facts = { 4 | 'is_virtual' => true, 5 | 'kernel' => 'Linux', 6 | 'virtual' => 'vmware', 7 | 'os' => { 8 | 'name' => 'CentOS', 9 | 'family' => 'RedHat', 10 | 'release' => { 11 | 'major' => '7', 12 | }, 13 | }, 14 | } 15 | 16 | describe 'vmwaretools', 'type' => :class do 17 | context 'default' do 18 | let(:facts) { default_facts.merge('vmwaretools_version' => '9.2.0') } 19 | 20 | it { is_expected.to contain_class('vmwaretools::params') } 21 | it { is_expected.to contain_class('vmwaretools::config_tools') } 22 | it { is_expected.to contain_class('vmwaretools::install') } 23 | end 24 | 25 | context 'no vmwaretools_version' do 26 | let(:facts) { default_facts } 27 | 28 | it { is_expected.to raise_error(Puppet::Error, %r{vmwaretools_version fact not present, please check your pluginsync configuraton.}) } 29 | end 30 | 31 | context 'no md5' do 32 | let(:facts) { default_facts.merge('vmwaretools_version' => '9.2.0') } 33 | let(:params) { { 'archive_url' => 'http://myserver.tld' } } 34 | 35 | it { is_expected.to raise_error(Puppet::Error, %r{MD5 not given for VMware Tools installer package}) } 36 | end 37 | 38 | context 'timesync on' do 39 | let(:facts) { default_facts.merge('vmwaretools_version' => '9.2.0') } 40 | let(:params) { { 'timesync' => true } } 41 | 42 | it { is_expected.to contain_class('vmwaretools::timesync') } 43 | end 44 | 45 | context 'timesync off' do 46 | let(:facts) { default_facts.merge('vmwaretools_version' => '9.2.0') } 47 | let(:params) { { 'timesync' => false } } 48 | 49 | it { is_expected.to contain_class('vmwaretools::timesync') } 50 | end 51 | 52 | context 'fail on non-vmware with virtual => xen' do 53 | let(:facts) { default_facts.merge('virtual' => 'xen') } 54 | let(:params) { { 'fail_on_non_vmware' => true } } 55 | 56 | it { is_expected.to raise_error(Puppet::Error, %r{Not a VMware platform.}) } 57 | end 58 | 59 | context 'fail on non-vmware with is_virtual => false' do 60 | let(:facts) { default_facts.merge('is_virtual' => false) } 61 | let(:params) { { 'fail_on_non_vmware' => true } } 62 | 63 | it { is_expected.to raise_error(Puppet::Error, %r{Not a VMware platform.}) } 64 | end 65 | end 66 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | This module has grown over time based on a range of contributions from 2 | people using it. If you follow these contributing guidelines your patch 3 | will likely make it into a release a little quicker. 4 | 5 | ## Contributing 6 | 7 | Please note that this project has adopted the Voxpupuli Contributor Code of 8 | Conduct. By participating in this project you agree to abide by its terms. 9 | [Contributor Code of Conduct](https://voxpupuli.org/coc/). 10 | 11 | 1. Fork the repo. 12 | 13 | 1. Create a separate branch for your change. 14 | 15 | 1. Run the tests. Only pull requests with passing tests, and documentation will 16 | be merged. 17 | 18 | 1. Add a test for your change. Only refactoring and documentation 19 | changes require no new tests. If you are adding functionality 20 | or fixing a bug, please add a test. 21 | 22 | 1. Squash your commits down into logical components. Make sure to rebase 23 | against the current master. 24 | 25 | 1. Push the branch to your fork and submit a pull request. 26 | 27 | Please be prepared to repeat some of these steps as our contributors review 28 | your code. 29 | 30 | ## Dependencies 31 | 32 | The testing and development tools have a bunch of dependencies, 33 | all managed by [bundler](http://bundler.io/) according to the 34 | [Puppet support matrix](http://docs.puppetlabs.com/guides/platforms.html#ruby-versions). 35 | 36 | By default the tests use a baseline version of Puppet. 37 | 38 | If you have Ruby 2.x or want a specific version of Puppet, 39 | you must set an environment variable such as: 40 | 41 | export PUPPET_VERSION="~> 4.2.0" 42 | 43 | Install the dependencies like so... 44 | 45 | bundle install 46 | 47 | ## Syntax and style 48 | 49 | The test suite will run [Puppet Lint](http://puppet-lint.com/) and 50 | [Puppet Syntax](https://github.com/gds-operations/puppet-syntax) to 51 | check various syntax and style things. You can run these locally with: 52 | 53 | bundle exec rake lint 54 | bundle exec rake validate 55 | 56 | It will also run some [Rubocop](http://batsov.com/rubocop/) tests 57 | against it. You can run those locally ahead of time with: 58 | 59 | bundle exec rake rubocop 60 | 61 | ## Running the unit tests 62 | 63 | The unit test suite covers most of the code, as mentioned above please 64 | add tests if you're adding new functionality. If you've not used 65 | [rspec-puppet](http://rspec-puppet.com/) before then feel free to ask 66 | about how best to test your new feature. 67 | 68 | To run your all the unit tests 69 | 70 | bundle exec rake spec SPEC_OPTS='--format documentation' 71 | 72 | To run a specific spec test set the `SPEC` variable: 73 | 74 | bundle exec rake spec SPEC=spec/foo_spec.rb 75 | 76 | To run the linter, the syntax checker and the unit tests: 77 | 78 | bundle exec rake test 79 | -------------------------------------------------------------------------------- /manifests/install/exec.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::install::exec 2 | # 3 | # This class handles the VMware Tools compilation and uncompressing. 4 | # 5 | # == Actions: 6 | # 7 | # Uncompresses the VMware Tools tarball 8 | # Installs VMware Tools, accepting all installer defaults 9 | # Cleans up old tarballs 10 | # Cleans up VMware Tools uncompressed files 11 | # 12 | # === Authors: 13 | # 14 | # Craig Watson 15 | # 16 | # === Copyright: 17 | # 18 | # Copyright (C) Craig Watson 19 | # Published under the Apache License v2.0 20 | # 21 | class vmwaretools::install::exec { 22 | 23 | Exec { 24 | path => ['/bin','/usr/bin', '/sbin'], 25 | refreshonly => true, 26 | timeout => 0, 27 | } 28 | 29 | if $::vmwaretools::params::download_vmwaretools == true { 30 | 31 | if $::vmwaretools::manage_curl_pkgs == true { 32 | $download_require = [Package['curl'],File["${::vmwaretools::working_dir}/download.sh"]] 33 | } else { 34 | $download_require = File["${::vmwaretools::working_dir}/download.sh"] 35 | } 36 | 37 | exec { 'download_vmwaretools': 38 | command => "${::vmwaretools::working_dir}/download.sh", 39 | creates => "${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz", 40 | require => $download_require, 41 | refreshonly => false, 42 | notify => Exec['uncompress_vmwaretools'], 43 | } 44 | 45 | Exec['uncompress_vmwaretools'] { 46 | require => Exec['download_vmwaretools'], 47 | } 48 | 49 | } else { 50 | Exec['uncompress_vmwaretools'] { 51 | require => File["${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz"], 52 | } 53 | } 54 | 55 | exec { 56 | 'uncompress_vmwaretools': 57 | cwd => $::vmwaretools::working_dir, 58 | command => "tar -xf ${::vmwaretools::working_dir}/VMwareTools-${::vmwaretools::version}.tar.gz", 59 | notify => Exec['install_vmwaretools']; 60 | 'install_vmwaretools': 61 | command => $::vmwaretools::params::install_command, 62 | require => Exec['uncompress_vmwaretools'], 63 | notify => Exec['clean_vmwaretools']; 64 | 'clean_vmwaretools': 65 | # lint:ignore:140chars 66 | command => "rm -rf ${::vmwaretools::working_dir}/vmware-tools-distrib && find ${::vmwaretools::working_dir}/*.tar.gz -not -name VMwareTools-${::vmwaretools::version}.tar.gz -delete", 67 | # lint:endignore 68 | require => Exec['install_vmwaretools']; 69 | } 70 | 71 | if $::vmwaretools::keep_working_dir == false { 72 | Exec['clean_vmwaretools'] { 73 | notify => Exec['remove_vmwaretools_working_dir'], 74 | } 75 | 76 | exec { 'remove_vmwaretools_working_dir': 77 | command => "rm -rf ${::vmwaretools::working_dir}", 78 | require => Exec['clean_vmwaretools'], 79 | } 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /manifests/params.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools::params 2 | # 3 | # This class handles parameters for the vmwaretools module, including the logic 4 | # that decided if we should install a new version of VMware Tools. 5 | # 6 | # == Actions: 7 | # 8 | # None 9 | # 10 | # === Authors: 11 | # 12 | # Craig Watson 13 | # 14 | # === Copyright: 15 | # 16 | # Copyright (C) Craig Watson 17 | # Published under the Apache License v2.0 18 | # 19 | class vmwaretools::params { 20 | 21 | if $facts['vmwaretools_version'] == 'not installed' { 22 | # If nothing is installed, deploy. 23 | $deploy_files = true 24 | } elsif versioncmp($::vmwaretools::version,$facts['vmwaretools_version']) == 0 { 25 | # If versions are the same, do not deploy. 26 | $deploy_files = false 27 | } elsif versioncmp($::vmwaretools::version,$facts['vmwaretools_version']) < 0 { 28 | # Action would be a downgrade 29 | if $::vmwaretools::prevent_downgrade == true { 30 | $deploy_files = false 31 | } else { 32 | $deploy_files = true 33 | } 34 | } elsif versioncmp($::vmwaretools::version,$facts['vmwaretools_version']) > 0 { 35 | # Action would be an upgrade 36 | if $::vmwaretools::prevent_upgrade == true { 37 | $deploy_files = false 38 | } else { 39 | $deploy_files = true 40 | } 41 | } 42 | 43 | if ($::vmwaretools::archive_url == 'puppet') or ($::vmwaretools::archive_url =~ /^puppet:\/\//) { 44 | $download_vmwaretools = false 45 | } else { 46 | $download_vmwaretools = true 47 | } 48 | 49 | if $::vmwaretools::force_install == true { 50 | if (versioncmp($::vmwaretools::version, '10.0' >= 0)) { 51 | $install_command = "${::vmwaretools::working_dir}/vmware-tools-distrib/vmware-install.pl -d -f" 52 | } else { 53 | $install_command = "echo 'yes' | ${::vmwaretools::working_dir}/vmware-tools-distrib/vmware-install.pl" 54 | } 55 | } else { 56 | $install_command = "${::vmwaretools::working_dir}/vmware-tools-distrib/vmware-install.pl -d" 57 | } 58 | 59 | # Workaround for 'purge' bug on RH-based systems 60 | # https://projects.puppetlabs.com/issues/2833 61 | # https://projects.puppetlabs.com/issues/11450 62 | # https://tickets.puppetlabs.com/browse/PUP-1198 63 | $purge_package_ensure = $facts['os']['family'] ? { 64 | 'RedHat' => absent, 65 | 'Suse' => absent, 66 | default => purged, 67 | } 68 | 69 | $awk_path = $facts['os']['family'] ? { 70 | 'RedHat' => '/bin/awk', 71 | 'Debian' => '/usr/bin/awk', 72 | default => '/usr/bin/awk', 73 | } 74 | 75 | $clean_failed = $::vmwaretools::clean_failed_download ? { 76 | true => '1', 77 | default => '0' 78 | } 79 | 80 | $redhat_devel_package = "kernel-devel-${facts[kernelrelease]}" 81 | 82 | $purge_package_list = [ 'open-vm-dkms', 'vmware-tools-services', 83 | 'vmware-tools-foundation', 'open-vm-tools-desktop', 84 | 'open-vm-source', 'open-vm-toolbox', 'open-vm-tools', 85 | 'open-vm-tools-dbg', 'open-vm-tools-gui', 'vmware-kmp-debug', 86 | 'vmware-kmp-default', 'vmware-kmp-pae', 'vmware-kmp-trace', 87 | 'vmware-guest-kmp-debug', 'vmware-guest-kmp-default', 88 | 'vmware-guest-kmp-desktop', 'vmware-guest-kmp-pae', 89 | 'libvmtools-devel', 'libvmtools0' ] 90 | } 91 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source ENV['GEM_SOURCE'] || 'https://rubygems.org' 2 | 3 | def location_for(place_or_version, fake_version = nil) 4 | git_url_regex = %r{\A(?(https?|git)[:@][^#]*)(#(?.*))?} 5 | file_url_regex = %r{\Afile:\/\/(?.*)} 6 | 7 | if place_or_version && (git_url = place_or_version.match(git_url_regex)) 8 | [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact 9 | elsif place_or_version && (file_url = place_or_version.match(file_url_regex)) 10 | ['>= 0', { path: File.expand_path(file_url[:path]), require: false }] 11 | else 12 | [place_or_version, { require: false }] 13 | end 14 | end 15 | 16 | ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments 17 | minor_version = ruby_version_segments[0..1].join('.') 18 | 19 | group :development do 20 | gem "fast_gettext", '1.1.0', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0') 21 | gem "fast_gettext", require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0') 22 | gem "json_pure", '<= 2.0.1', require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') 23 | gem "json", '= 1.8.1', require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9') 24 | gem "json", '= 2.0.4', require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 25 | gem "json", '= 2.1.0', require: false if Gem::Requirement.create(['>= 2.5.0', '< 2.7.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup)) 26 | gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] 27 | gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby] 28 | gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby] 29 | gem "puppet-module-win-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw] 30 | gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3', require: false, platforms: [:mswin, :mingw, :x64_mingw] 31 | end 32 | 33 | puppet_version = ENV['PUPPET_GEM_VERSION'] 34 | facter_version = ENV['FACTER_GEM_VERSION'] 35 | hiera_version = ENV['HIERA_GEM_VERSION'] 36 | 37 | gems = {} 38 | 39 | gems['puppet'] = location_for(puppet_version) 40 | 41 | # If facter or hiera versions have been specified via the environment 42 | # variables 43 | 44 | gems['facter'] = location_for(facter_version) if facter_version 45 | gems['hiera'] = location_for(hiera_version) if hiera_version 46 | 47 | if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)} 48 | # If we're using a Puppet gem on Windows which handles its own win32-xxx gem 49 | # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445). 50 | gems['win32-dir'] = ['<= 0.4.9', require: false] 51 | gems['win32-eventlog'] = ['<= 0.6.5', require: false] 52 | gems['win32-process'] = ['<= 0.7.5', require: false] 53 | gems['win32-security'] = ['<= 0.2.5', require: false] 54 | gems['win32-service'] = ['0.8.8', require: false] 55 | end 56 | 57 | gems.each do |gem_name, gem_params| 58 | gem gem_name, *gem_params 59 | end 60 | 61 | # Evaluate Gemfile.local and ~/.gemfile if they exist 62 | extra_gemfiles = [ 63 | "#{__FILE__}.local", 64 | File.join(Dir.home, '.gemfile'), 65 | ] 66 | 67 | extra_gemfiles.each do |gemfile| 68 | if File.file?(gemfile) && File.readable?(gemfile) 69 | eval(File.read(gemfile), binding) 70 | end 71 | end 72 | # vim: syntax=ruby 73 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any? 2 | require 'puppetlabs_spec_helper/rake_tasks' 3 | require 'puppet-syntax/tasks/puppet-syntax' 4 | require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any? 5 | require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any? 6 | require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any? 7 | 8 | def changelog_user 9 | return unless Rake.application.top_level_tasks.include? "changelog" 10 | returnVal = nil || JSON.load(File.read('metadata.json'))['author'] 11 | raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil? 12 | puts "GitHubChangelogGenerator user:#{returnVal}" 13 | returnVal 14 | end 15 | 16 | def changelog_project 17 | return unless Rake.application.top_level_tasks.include? "changelog" 18 | 19 | returnVal = nil 20 | returnVal ||= begin 21 | metadata_source = JSON.load(File.read('metadata.json'))['source'] 22 | metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z}) 23 | 24 | metadata_source_match && metadata_source_match[1] 25 | end 26 | 27 | raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil? 28 | 29 | puts "GitHubChangelogGenerator project:#{returnVal}" 30 | returnVal 31 | end 32 | 33 | def changelog_future_release 34 | return unless Rake.application.top_level_tasks.include? "changelog" 35 | returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version'] 36 | raise "unable to find the future_release (version) in metadata.json" if returnVal.nil? 37 | puts "GitHubChangelogGenerator future_release:#{returnVal}" 38 | returnVal 39 | end 40 | 41 | PuppetLint.configuration.send('disable_relative') 42 | 43 | if Bundler.rubygems.find_name('github_changelog_generator').any? 44 | GitHubChangelogGenerator::RakeTask.new :changelog do |config| 45 | raise "Set CHANGELOG_GITHUB_TOKEN environment variable eg 'export CHANGELOG_GITHUB_TOKEN=valid_token_here'" if Rake.application.top_level_tasks.include? "changelog" and ENV['CHANGELOG_GITHUB_TOKEN'].nil? 46 | config.user = "#{changelog_user}" 47 | config.project = "#{changelog_project}" 48 | config.future_release = "#{changelog_future_release}" 49 | config.exclude_labels = ['maintenance'] 50 | config.header = "# Change log\n\nAll notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org)." 51 | config.add_pr_wo_labels = true 52 | config.issues = false 53 | config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM" 54 | config.configure_sections = { 55 | "Changed" => { 56 | "prefix" => "### Changed", 57 | "labels" => ["backwards-incompatible"], 58 | }, 59 | "Added" => { 60 | "prefix" => "### Added", 61 | "labels" => ["feature", "enhancement"], 62 | }, 63 | "Fixed" => { 64 | "prefix" => "### Fixed", 65 | "labels" => ["bugfix"], 66 | }, 67 | } 68 | end 69 | else 70 | desc 'Generate a Changelog from GitHub' 71 | task :changelog do 72 | raise <= Gem::Version.new('2.2.2')" 83 | EOM 84 | end 85 | end 86 | 87 | -------------------------------------------------------------------------------- /.rubocop.yml: -------------------------------------------------------------------------------- 1 | --- 2 | require: 3 | - rubocop-rspec 4 | - rubocop-i18n 5 | AllCops: 6 | DisplayCopNames: true 7 | TargetRubyVersion: '2.1' 8 | Include: 9 | - "./**/*.rb" 10 | Exclude: 11 | - bin/* 12 | - ".vendor/**/*" 13 | - "**/Gemfile" 14 | - "**/Rakefile" 15 | - pkg/**/* 16 | - spec/fixtures/**/* 17 | - vendor/**/* 18 | - "**/Puppetfile" 19 | - "**/Vagrantfile" 20 | - "**/Guardfile" 21 | Metrics/LineLength: 22 | Description: People have wide screens, use them. 23 | Max: 200 24 | GetText: 25 | Enabled: false 26 | GetText/DecorateString: 27 | Description: We don't want to decorate test output. 28 | Exclude: 29 | - spec/**/* 30 | Enabled: false 31 | RSpec/BeforeAfterAll: 32 | Description: Beware of using after(:all) as it may cause state to leak between tests. 33 | A necessary evil in acceptance testing. 34 | Exclude: 35 | - spec/acceptance/**/*.rb 36 | RSpec/HookArgument: 37 | Description: Prefer explicit :each argument, matching existing module's style 38 | EnforcedStyle: each 39 | Style/BlockDelimiters: 40 | Description: Prefer braces for chaining. Mostly an aesthetical choice. Better to 41 | be consistent then. 42 | EnforcedStyle: braces_for_chaining 43 | Style/ClassAndModuleChildren: 44 | Description: Compact style reduces the required amount of indentation. 45 | EnforcedStyle: compact 46 | Style/EmptyElse: 47 | Description: Enforce against empty else clauses, but allow `nil` for clarity. 48 | EnforcedStyle: empty 49 | Style/FormatString: 50 | Description: Following the main puppet project's style, prefer the % format format. 51 | EnforcedStyle: percent 52 | Style/FormatStringToken: 53 | Description: Following the main puppet project's style, prefer the simpler template 54 | tokens over annotated ones. 55 | EnforcedStyle: template 56 | Style/Lambda: 57 | Description: Prefer the keyword for easier discoverability. 58 | EnforcedStyle: literal 59 | Style/RegexpLiteral: 60 | Description: Community preference. See https://github.com/voxpupuli/modulesync_config/issues/168 61 | EnforcedStyle: percent_r 62 | Style/TernaryParentheses: 63 | Description: Checks for use of parentheses around ternary conditions. Enforce parentheses 64 | on complex expressions for better readability, but seriously consider breaking 65 | it up. 66 | EnforcedStyle: require_parentheses_when_complex 67 | Style/TrailingCommaInArguments: 68 | Description: Prefer always trailing comma on multiline argument lists. This makes 69 | diffs, and re-ordering nicer. 70 | EnforcedStyleForMultiline: comma 71 | Style/TrailingCommaInLiteral: 72 | Description: Prefer always trailing comma on multiline literals. This makes diffs, 73 | and re-ordering nicer. 74 | EnforcedStyleForMultiline: comma 75 | Style/SymbolArray: 76 | Description: Using percent style obscures symbolic intent of array's contents. 77 | EnforcedStyle: brackets 78 | RSpec/MessageSpies: 79 | EnforcedStyle: receive 80 | Style/Documentation: 81 | Exclude: 82 | - lib/puppet/parser/functions/**/* 83 | - spec/**/* 84 | Style/WordArray: 85 | EnforcedStyle: brackets 86 | Style/CollectionMethods: 87 | Enabled: true 88 | Style/MethodCalledOnDoEndBlock: 89 | Enabled: true 90 | Style/StringMethods: 91 | Enabled: true 92 | GetText/DecorateFunctionMessage: 93 | Enabled: false 94 | GetText/DecorateStringFormattingUsingInterpolation: 95 | Enabled: false 96 | GetText/DecorateStringFormattingUsingPercent: 97 | Enabled: false 98 | Layout/EndOfLine: 99 | Enabled: false 100 | Layout/IndentHeredoc: 101 | Enabled: false 102 | Metrics/AbcSize: 103 | Enabled: false 104 | Metrics/BlockLength: 105 | Enabled: false 106 | Metrics/ClassLength: 107 | Enabled: false 108 | Metrics/CyclomaticComplexity: 109 | Enabled: false 110 | Metrics/MethodLength: 111 | Enabled: false 112 | Metrics/ModuleLength: 113 | Enabled: false 114 | Metrics/ParameterLists: 115 | Enabled: false 116 | Metrics/PerceivedComplexity: 117 | Enabled: false 118 | RSpec/DescribeClass: 119 | Enabled: false 120 | RSpec/ExampleLength: 121 | Enabled: false 122 | RSpec/MessageExpectation: 123 | Enabled: false 124 | RSpec/MultipleExpectations: 125 | Enabled: false 126 | RSpec/NestedGroups: 127 | Enabled: false 128 | Style/AsciiComments: 129 | Enabled: false 130 | Style/IfUnlessModifier: 131 | Enabled: false 132 | Style/SymbolProc: 133 | Enabled: false 134 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # puppet-vmwaretools 2 | 3 | [![Build Status](https://secure.travis-ci.org/craigwatson/puppet-vmwaretools.png?branch=master)](http://travis-ci.org/craigwatson/puppet-vmwaretools) 4 | [![Puppet Forge](http://img.shields.io/puppetforge/v/CraigWatson1987/vmwaretools.svg)](https://forge.puppetlabs.com/CraigWatson1987/vmwaretools) 5 | [![Forge Endorsement](https://img.shields.io/puppetforge/e/CraigWatson1987/vmwaretools.svg)](https://forge.puppetlabs.com/CraigWatson1987/vmwaretools) 6 | [![Forge Downloads](https://img.shields.io/puppetforge/dt/CraigWatson1987/vmwaretools.svg)](https://forge.puppetlabs.com/CraigWatson1987/vmwaretools) 7 | 8 | ## Table of Contents 9 | 10 | 1. [Overview - What is the puppet-vmwaretools module?](#overview) 11 | 1. [Module Description - What does the module do?](#module-description) 12 | 1. [Setup - The basics of getting started with puppet-vmwaretools](#setup) 13 | * [What puppet-vmwaretools affects](#what-puppet-vmwaretools-affects) 14 | * [Setup requirements](#setup-requirements) 15 | * [Beginning with puppet-vmwaretools](#beginning-with-registry) 16 | 1. [Usage - Configuration options and additional functionality](#usage) 17 | 1. [Reference - An under-the-hood peek at what the module is doing](#reference) 18 | 1. [Limitations - OS compatibility, etc.](#limitations) 19 | 1. [Development - Guide for contributing to the module](#development) 20 | 21 | ## Overview 22 | 23 | This module manages the installation and upgrade of VMware Tools via the source code tarballs distributed by VMware. 24 | 25 | ## Module Description 26 | 27 | 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). 28 | 29 | 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. 30 | 31 | 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. 32 | 33 | ## Setup 34 | 35 | ### What puppet-vmwaretools affects 36 | 37 | * Compares installed version with the configured version via the `vmwaretools` fact 38 | * Transfer the VMware Tools archive to the target agent (via Puppet or HTTP) 39 | * Untar the archive and run vmware-install-tools.pl (warning: this installer is run with the `-d` flag to accept all default answers). 40 | * Removes several packages, see [params.pp](https://github.com/craigwatson/puppet-vmwaretools/blob/master/manifests/params.pp#L89) for the complete list. 41 | 42 | ### Setup Requirements 43 | 44 | * 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. 45 | * 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. 46 | * As of version 1.0.0, the module requires the [PuppetLabs stdlib module](https://github.come/puppetlabs/puppetlabs-stdlib) module to be available within your Puppet code. 47 | 48 | ### Beginning with puppet-vmwaretools 49 | 50 | To accept default class parameters: 51 | 52 | include vmwaretools 53 | 54 | ## Usage 55 | 56 | The source distribution mechanism can be customised by declaring the module with `archive_url` and `archive_md5` parameters (default is to use Puppet filebuckets). 57 | 58 | To specify a non-default version, working directory and HTTP URL (other variables can be viewed and/or modified in `manifests/init.pp`): 59 | 60 | class { 'vmwaretools': 61 | version => '8.6.5-621624', 62 | working_dir => '/tmp/vmwaretools', 63 | archive_url => 'http://server.local/my/dir', 64 | archive_md5 => '9df56c317ecf466f954d91f6c5ce8a6f', 65 | } 66 | 67 | 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: 68 | 69 | * `manage_dev_pkgs` set to false to prevent development packages being managed 70 | * `manage_perl_pkgs` set to false to prevent Perl packages being managed 71 | * `manage_curl_pkgs` set to false to prevent curl packages being managed 72 | 73 | ## Reference 74 | 75 | ### Facts 76 | 77 | #### `vmwaretools_version` 78 | * Detects any existing VMware Tools installations and, if found, reports the installed version. 79 | 80 | #### `esx_version` 81 | * Detects the underlying ESX version from `dmidecode`, thanks to [François Deppierraz](https://github.com/ctrlaltdel) for the [pull request](https://github.com/craigwatson/puppet-vmwaretools/pull/20)! 82 | 83 | ### Classes 84 | 85 | #### `vmwaretools::install::exec` 86 | 87 | * Declares all `exec` commands run by the module. 88 | 89 | #### `vmwaretools::install::package` 90 | 91 | * Handles installing the required tools to compile and install the archive, as well as purging OSP and open-source VMware Tools packages. 92 | * **NOTE:** Due to bugs in Puppet's `yum` provider, the OSP/open-source packages are only marked as `absent`, not `purged`. 93 | 94 | #### `vmwaretools::install::archive` 95 | 96 | * Handles the archive distribution (either places a download script or the archive). 97 | 98 | #### `vmwaretools::params` 99 | 100 | * O/S-specific and module configuration (e.g. paths to binaries and a boolean variable to control file deployment) 101 | 102 | #### `vmwaretools::config_tools` 103 | 104 | * Executes `vmware-config-tools.pl -d` if the `vmci.ko` module doesn't exist for the running kernel 105 | 106 | #### `vmwaretools::timesync` 107 | 108 | * Handles time synchronisation between the virtual machine and host 109 | 110 | ## Limitations 111 | 112 | ### Supported Operating Systems 113 | 114 | * Ubuntu/Debian 14.04 and 16.04 115 | * CentOS/RedHat 6 and 7 116 | * SuSE/SLES 117 | 118 | ## Development 119 | 120 | * Copyright (C) 2013 to 2020 Craig Watson - 121 | * VMware Tools fact by [janorn](https://github.com/janorn/puppet-vmwaretools) 122 | * Distributed under the terms of the Apache License v2.0 - see LICENSE file for details. 123 | * **Please note** that the module was licensed under the terms of the GNU General Public License v3 until commit [fea91b58241481fc3fc4aa0e02996cc9ef0f131e](https://github.com/craigwatson/puppet-vmwaretools/commit/fea91b58241481fc3fc4aa0e02996cc9ef0f131e) 124 | * Further contributions and testing reports are extremely welcome - please submit a pull request or issue on [GitHub](https://github.com/craigwatson/puppet-vmwaretools) 125 | * Testing environment kindly donated by [Sleek Networks Ltd (An Adapt Company)](http://www.sleek.net) 126 | -------------------------------------------------------------------------------- /manifests/init.pp: -------------------------------------------------------------------------------- 1 | # == Class: vmwaretools 2 | # 3 | # This class handles installing the VMware Tools via the archives distributed 4 | # by VMware. Upgrades and downgrades are also supported. 5 | # 6 | # The archive can either be placed on an HTTP-accessible location, or within 7 | # this module's 'files' directory. 8 | # 9 | # === Parameters: 10 | # 11 | # [*version*] 12 | # The numeric version of the tools that you want to install. This can be 13 | # found by looking at the filename of the archive - e.g. 8.6.5-621624 14 | # 15 | # [*working_dir*] 16 | # The directory to store files in. 17 | # Default: '/tmp/vmwaretools' (string) 18 | # 19 | # [*install_devel*] 20 | # If you really want to install kernel headers on RedHat- or Suse-derivative 21 | # operating systems - you will likely not need this as most RH distros have 22 | # pre-compiled kernel modules. 23 | # Default: false (boolean) 24 | # 25 | # [*archive_url*] 26 | # Specify an HTTP location to download the archive from - this is useful when 27 | # you want to avoid packaging the installer with your Puppet code. NOTE that 28 | # this does NOT include the filename, just the path to the file. The filename 29 | # will be constucted as 'VMwareTools-$version.tar.gz'. 30 | # Default: 'puppet' (string) 31 | # 32 | # [*archive_md5*] 33 | # md5sum of the archive - required if using an HTTP location above. 34 | # Default: '' (empty string) 35 | # 36 | # [*fail_on_non_vmware*] 37 | # Output a hard failure message if the module is run on non-vmware hardware. 38 | # Default: false (boolean) 39 | # 40 | # [*keep_working_dir*] 41 | # Keep the working dir on disk after installation. 42 | # Default: false (boolean) 43 | # 44 | # [*ignore_autodetect*] 45 | # Ignores the automatic platform detection, and forces the module to be 46 | # loaded, regardless of the underlying system. Only really useful for testing 47 | # as it could have unpredictable results. 48 | # Default: false (boolean) 49 | # 50 | # [*force_install*] 51 | # Forces installation by piping 'yes' to the VMware Tools install script. 52 | # This is necessary to install on operating systems where VMware has opted 53 | # to favour the open-vm-tools pacakge. NOTE: The tools will still fail to 54 | # install on these operating systems, so it is recommended to set this 55 | # parameter to true. 56 | # Default: false (boolean) 57 | # 58 | # [*prevent_downgrade*] 59 | # If the system has a version of the tools installed which is newer that what 60 | # is set in the version parameter, do not downgrade the tools. 61 | # Default: true (boolean) 62 | # 63 | # [*prevent_upgrade*] 64 | # If the system has a version of the tools installed which is older that what 65 | # is set in the version parameter, do not upgrade the tools. 66 | # Note: This will still allow tools to be downgraded unless prevent_downgrade 67 | # also is set. 68 | # Default: false (boolean) 69 | # 70 | # [*timesync*] 71 | # Should the node synchronise their system clock with the vSphere server? 72 | # Acceptable values are true, false (both literal booleans, NOT quoted 73 | # strings) or undef (literal). Booleans will either enable or disable 74 | # synchronisation, and undef will disable management of timesync altogether. 75 | # Default: undef (UNDEFINED) 76 | # 77 | # [*manage_dev_pkgs*] 78 | # Whether to install kernel devel packages which are used for compiling VMware 79 | # Tools on operating systems without pre-built binaries. 80 | # Default: true (boolean) 81 | # 82 | # [*manage_perl_pkgs*] 83 | # Whether to install perl, which is used to run the installer. Useful when 84 | # other modules are managing the package, although we use stdlib's 85 | # ensure_package resource which should eliminate most issues. 86 | # NOTE that the installer will fail without perl present on the sytem. 87 | # Default: true (boolean) 88 | # 89 | # [*manage_curl_pkgs*] 90 | # Whether to install curl, which is used to download the VMware Tools from an 91 | # HTTP location. Useful when other modules are managing the package, although 92 | # we use stdlib's ensure_package resource which should eliminate most issues. 93 | # Default: true (boolean) 94 | # 95 | # [*clean_failed_download*] 96 | # Whether to remove failed HTTP downloads. This ensures that broken downloads 97 | # are automatically retried on the next Puppet run. 98 | # NOTE: This will default to true in a later release of this module. 99 | # Default: false (boolean) 100 | # 101 | # [*curl_proxy*] 102 | # Specify an HTTP proxy to be used with curl when downloading the archive. 103 | # This can be of the format http://: 104 | # Default: false (no proxy usage) 105 | # 106 | # == Actions: 107 | # 108 | # * Compares installed version with the configured version 109 | # * Transfer the VMware Tools archive to the target agent (via Puppet or HTTP) 110 | # * Untar the archive, run vmware-install-tools.pl 111 | # * Removes open-vm-tools 112 | # 113 | # === Requires: 114 | # 115 | # * HTTP download script: wget, awk, md5sum 116 | # 117 | # === Sample Usage: 118 | # 119 | # To accept defaults: 120 | # 121 | # include vmwaretools 122 | # 123 | # To specify a non-default version, working directory and HTTP URL: 124 | # 125 | # class { 'vmwaretools': 126 | # version => '8.6.5-621624', 127 | # working_dir => '/tmp/vmwaretools' 128 | # archive_url => 'http://server.local/my/dir', 129 | # archive_md5 => '9df56c317ecf466f954d91f6c5ce8a6f', 130 | # } 131 | # 132 | # === Authors: 133 | # 134 | # Craig Watson 135 | # 136 | # === Copyright: 137 | # 138 | # Copyright (C) Craig Watson 139 | # Published under the Apache License v2.0 140 | class vmwaretools ( 141 | String $version = '9.0.0-782409', 142 | String $working_dir = '/tmp/vmwaretools', 143 | Boolean $install_devel = false, 144 | String $archive_url = 'puppet', 145 | Optional[String] $archive_md5 = undef, 146 | Boolean $fail_on_non_vmware = false, 147 | Boolean $keep_working_dir = false, 148 | Boolean $ignore_autodetect = false, 149 | Boolean $force_install = false, 150 | Boolean $prevent_downgrade = true, 151 | Boolean $prevent_upgrade = false, 152 | Optional[Boolean] $timesync = undef, 153 | Boolean $manage_dev_pkgs = true, 154 | Boolean $manage_perl_pkgs = true, 155 | Boolean $manage_curl_pkgs = true, 156 | Boolean $curl_proxy = false, 157 | Boolean $clean_failed_download = false, 158 | ) { 159 | 160 | if ($ignore_autodetect == true) or (($facts['is_virtual'] and $facts['virtual'] == 'vmware') and ($facts['kernel'] == 'Linux')) { 161 | 162 | if $facts['vmwaretools_version'] == undef { 163 | fail 'vmwaretools_version fact not present, please check your pluginsync configuraton.' 164 | } 165 | 166 | include ::vmwaretools::params 167 | 168 | if ($::vmwaretools::params::download_vmwaretools == true) and ($archive_md5 == undef) { 169 | fail 'MD5 not given for VMware Tools installer package' 170 | } 171 | 172 | include ::vmwaretools::install 173 | include ::vmwaretools::config_tools 174 | 175 | if $timesync != undef { 176 | include ::vmwaretools::timesync 177 | } 178 | } elsif ($fail_on_non_vmware == true) and (($facts['is_virtual'] == false) or ($facts['virtual'] != 'vmware')) { 179 | fail 'Not a VMware platform.' 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /.gemfile.lock: -------------------------------------------------------------------------------- 1 | GIT 2 | remote: https://github.com/rodjek/rspec-puppet.git 3 | revision: 186fcc36a2b8656856ab34fc926939a7f75e2349 4 | specs: 5 | rspec-puppet (2.5.0) 6 | rspec 7 | 8 | GEM 9 | remote: https://rubygems.org/ 10 | specs: 11 | CFPropertyList (2.2.8) 12 | addressable (2.4.0) 13 | aws-sdk-v1 (1.66.0) 14 | json (~> 1.4) 15 | nokogiri (>= 1.4.4) 16 | backports (3.6.8) 17 | beaker (3.6.0) 18 | aws-sdk-v1 (~> 1.57) 19 | beaker-hiera (~> 0.0) 20 | beaker-hostgenerator 21 | docker-api 22 | fission (~> 0.4) 23 | fog (~> 1.38) 24 | google-api-client (~> 0.9) 25 | hocon (~> 1.0) 26 | in-parallel (~> 0.1) 27 | inifile (~> 2.0) 28 | json (~> 1.8) 29 | minitar (~> 0.5.4) 30 | minitest (~> 5.4) 31 | net-scp (~> 1.2) 32 | net-ssh (= 3.3.0.beta1) 33 | open_uri_redirections (~> 0.2.1) 34 | rbvmomi (~> 1.9) 35 | rsync (~> 1.0.9) 36 | stringify-hash (~> 0.0) 37 | unf (~> 0.1) 38 | beaker-hiera (0.1.1) 39 | stringify-hash (~> 0.0.0) 40 | beaker-hostgenerator (0.8.1) 41 | deep_merge (~> 1.0) 42 | stringify-hash (~> 0.0.0) 43 | beaker-rspec (6.0.0) 44 | beaker (~> 3.0) 45 | rspec 46 | serverspec (~> 2) 47 | specinfra (~> 2) 48 | builder (3.2.2) 49 | coderay (1.1.1) 50 | deep_merge (1.1.1) 51 | diff-lcs (1.2.5) 52 | docker-api (1.33.1) 53 | excon (>= 0.38.0) 54 | json 55 | domain_name (0.5.20161129) 56 | unf (>= 0.0.5, < 1.0.0) 57 | ethon (0.10.1) 58 | ffi (>= 1.3.0) 59 | excon (0.54.0) 60 | facter (2.4.6) 61 | CFPropertyList (~> 2.2.6) 62 | faraday (0.10.0) 63 | multipart-post (>= 1.2, < 3) 64 | faraday_middleware (0.10.1) 65 | faraday (>= 0.7.4, < 1.0) 66 | ffi (1.9.14) 67 | fission (0.5.0) 68 | CFPropertyList (~> 2.2) 69 | fog (1.38.0) 70 | fog-aliyun (>= 0.1.0) 71 | fog-atmos 72 | fog-aws (>= 0.6.0) 73 | fog-brightbox (~> 0.4) 74 | fog-cloudatcost (~> 0.1.0) 75 | fog-core (~> 1.32) 76 | fog-dynect (~> 0.0.2) 77 | fog-ecloud (~> 0.1) 78 | fog-google (<= 0.1.0) 79 | fog-json 80 | fog-local 81 | fog-openstack 82 | fog-powerdns (>= 0.1.1) 83 | fog-profitbricks 84 | fog-rackspace 85 | fog-radosgw (>= 0.0.2) 86 | fog-riakcs 87 | fog-sakuracloud (>= 0.0.4) 88 | fog-serverlove 89 | fog-softlayer 90 | fog-storm_on_demand 91 | fog-terremark 92 | fog-vmfusion 93 | fog-voxel 94 | fog-vsphere (>= 0.4.0) 95 | fog-xenserver 96 | fog-xml (~> 0.1.1) 97 | ipaddress (~> 0.5) 98 | fog-aliyun (0.1.0) 99 | fog-core (~> 1.27) 100 | fog-json (~> 1.0) 101 | ipaddress (~> 0.8) 102 | xml-simple (~> 1.1) 103 | fog-atmos (0.1.0) 104 | fog-core 105 | fog-xml 106 | fog-aws (1.1.0) 107 | fog-core (~> 1.38) 108 | fog-json (~> 1.0) 109 | fog-xml (~> 0.1) 110 | ipaddress (~> 0.8) 111 | fog-brightbox (0.11.0) 112 | fog-core (~> 1.22) 113 | fog-json 114 | inflecto (~> 0.0.2) 115 | fog-cloudatcost (0.1.2) 116 | fog-core (~> 1.36) 117 | fog-json (~> 1.0) 118 | fog-xml (~> 0.1) 119 | ipaddress (~> 0.8) 120 | fog-core (1.43.0) 121 | builder 122 | excon (~> 0.49) 123 | formatador (~> 0.2) 124 | fog-dynect (0.0.3) 125 | fog-core 126 | fog-json 127 | fog-xml 128 | fog-ecloud (0.3.0) 129 | fog-core 130 | fog-xml 131 | fog-google (0.1.0) 132 | fog-core 133 | fog-json 134 | fog-xml 135 | fog-json (1.0.2) 136 | fog-core (~> 1.0) 137 | multi_json (~> 1.10) 138 | fog-local (0.3.1) 139 | fog-core (~> 1.27) 140 | fog-openstack (0.1.18) 141 | fog-core (>= 1.40) 142 | fog-json (>= 1.0) 143 | ipaddress (>= 0.8) 144 | fog-powerdns (0.1.1) 145 | fog-core (~> 1.27) 146 | fog-json (~> 1.0) 147 | fog-xml (~> 0.1) 148 | fog-profitbricks (3.0.0) 149 | fog-core (~> 1.42) 150 | fog-json (~> 1.0) 151 | fog-rackspace (0.1.2) 152 | fog-core (>= 1.35) 153 | fog-json (>= 1.0) 154 | fog-xml (>= 0.1) 155 | ipaddress (>= 0.8) 156 | fog-radosgw (0.0.5) 157 | fog-core (>= 1.21.0) 158 | fog-json 159 | fog-xml (>= 0.0.1) 160 | fog-riakcs (0.1.0) 161 | fog-core 162 | fog-json 163 | fog-xml 164 | fog-sakuracloud (1.7.5) 165 | fog-core 166 | fog-json 167 | fog-serverlove (0.1.2) 168 | fog-core 169 | fog-json 170 | fog-softlayer (1.1.4) 171 | fog-core 172 | fog-json 173 | fog-storm_on_demand (0.1.1) 174 | fog-core 175 | fog-json 176 | fog-terremark (0.1.0) 177 | fog-core 178 | fog-xml 179 | fog-vmfusion (0.1.0) 180 | fission 181 | fog-core 182 | fog-voxel (0.1.0) 183 | fog-core 184 | fog-xml 185 | fog-vsphere (1.5.2) 186 | fog-core 187 | rbvmomi (~> 1.9) 188 | fog-xenserver (0.2.3) 189 | fog-core 190 | fog-xml 191 | fog-xml (0.1.2) 192 | fog-core 193 | nokogiri (~> 1.5, >= 1.5.11) 194 | formatador (0.2.5) 195 | gh (0.15.0) 196 | addressable (~> 2.4.0) 197 | backports 198 | faraday (~> 0.8) 199 | multi_json (~> 1.0) 200 | net-http-persistent (~> 2.9) 201 | net-http-pipeline 202 | google-api-client (0.9.20) 203 | addressable (~> 2.3) 204 | googleauth (~> 0.5) 205 | httpclient (~> 2.7) 206 | hurley (~> 0.1) 207 | memoist (~> 0.11) 208 | mime-types (>= 1.6) 209 | representable (~> 2.3.0) 210 | retriable (~> 2.0) 211 | googleauth (0.5.1) 212 | faraday (~> 0.9) 213 | jwt (~> 1.4) 214 | logging (~> 2.0) 215 | memoist (~> 0.12) 216 | multi_json (~> 1.11) 217 | os (~> 0.9) 218 | signet (~> 0.7) 219 | guard (2.14.0) 220 | formatador (>= 0.2.4) 221 | listen (>= 2.7, < 4.0) 222 | lumberjack (~> 1.0) 223 | nenv (~> 0.1) 224 | notiffany (~> 0.0) 225 | pry (>= 0.9.12) 226 | shellany (~> 0.0) 227 | thor (>= 0.18.1) 228 | guard-rake (1.0.0) 229 | guard 230 | rake 231 | hiera (3.3.0) 232 | highline (1.7.8) 233 | hocon (1.2.4) 234 | http-cookie (1.0.3) 235 | domain_name (~> 0.5) 236 | httpclient (2.8.3) 237 | hurley (0.2) 238 | in-parallel (0.1.15) 239 | inflecto (0.0.2) 240 | inifile (2.0.2) 241 | ipaddress (0.8.3) 242 | json (1.8.6) 243 | json_pure (1.8.6) 244 | jwt (1.5.6) 245 | launchy (2.4.3) 246 | addressable (~> 2.3) 247 | listen (3.1.5) 248 | rb-fsevent (~> 0.9, >= 0.9.4) 249 | rb-inotify (~> 0.9, >= 0.9.7) 250 | ruby_dep (~> 1.2) 251 | little-plugger (1.1.4) 252 | logging (2.1.0) 253 | little-plugger (~> 1.1) 254 | multi_json (~> 1.10) 255 | lumberjack (1.0.10) 256 | memoist (0.15.0) 257 | metaclass (0.0.4) 258 | method_source (0.8.2) 259 | mime-types (2.99.3) 260 | mini_portile2 (2.1.0) 261 | minitar (0.5.4) 262 | minitest (5.10.1) 263 | mocha (1.2.1) 264 | metaclass (~> 0.0.1) 265 | multi_json (1.12.1) 266 | multipart-post (2.0.0) 267 | nenv (0.3.0) 268 | net-http-persistent (2.9.4) 269 | net-http-pipeline (1.0.1) 270 | net-scp (1.2.1) 271 | net-ssh (>= 2.6.5) 272 | net-ssh (3.3.0.beta1) 273 | net-telnet (0.1.1) 274 | netrc (0.11.0) 275 | nokogiri (1.7.0) 276 | mini_portile2 (~> 2.1.0) 277 | notiffany (0.1.1) 278 | nenv (~> 0.1) 279 | shellany (~> 0.0) 280 | open_uri_redirections (0.2.1) 281 | os (0.9.6) 282 | pry (0.10.4) 283 | coderay (~> 1.1.0) 284 | method_source (~> 0.8.1) 285 | slop (~> 3.4) 286 | puppet (4.6.2) 287 | CFPropertyList (~> 2.2.6) 288 | facter (> 2.0, < 4) 289 | hiera (>= 2.0, < 4) 290 | json_pure (~> 1.8) 291 | puppet-blacksmith (3.4.0) 292 | puppet (>= 2.7.16) 293 | rest-client (~> 1.8.0) 294 | puppet-lint (2.0.2) 295 | puppet-syntax (2.2.0) 296 | rake 297 | puppetlabs_spec_helper (1.2.2) 298 | mocha (~> 1.0) 299 | puppet-lint (~> 2.0) 300 | puppet-syntax (~> 2.0) 301 | rspec-puppet (~> 2.0) 302 | pusher-client (0.6.2) 303 | json 304 | websocket (~> 1.0) 305 | rake (11.3.0) 306 | rb-fsevent (0.9.8) 307 | rb-inotify (0.9.7) 308 | ffi (>= 0.5.0) 309 | rbvmomi (1.9.4) 310 | builder (~> 3.2) 311 | json (>= 1.8) 312 | nokogiri (~> 1.5) 313 | trollop (~> 2.1) 314 | representable (2.3.0) 315 | uber (~> 0.0.7) 316 | rest-client (1.8.0) 317 | http-cookie (>= 1.0.2, < 2.0) 318 | mime-types (>= 1.16, < 3.0) 319 | netrc (~> 0.7) 320 | retriable (2.1.0) 321 | rspec (3.5.0) 322 | rspec-core (~> 3.5.0) 323 | rspec-expectations (~> 3.5.0) 324 | rspec-mocks (~> 3.5.0) 325 | rspec-core (3.5.4) 326 | rspec-support (~> 3.5.0) 327 | rspec-expectations (3.5.0) 328 | diff-lcs (>= 1.2.0, < 2.0) 329 | rspec-support (~> 3.5.0) 330 | rspec-its (1.2.0) 331 | rspec-core (>= 3.0.0) 332 | rspec-expectations (>= 3.0.0) 333 | rspec-mocks (3.5.0) 334 | diff-lcs (>= 1.2.0, < 2.0) 335 | rspec-support (~> 3.5.0) 336 | rspec-support (3.5.0) 337 | rsync (1.0.9) 338 | ruby_dep (1.5.0) 339 | safe_yaml (1.0.4) 340 | serverspec (2.37.2) 341 | multi_json 342 | rspec (~> 3.0) 343 | rspec-its 344 | specinfra (~> 2.53) 345 | sfl (2.3) 346 | shellany (0.0.1) 347 | signet (0.7.3) 348 | addressable (~> 2.3) 349 | faraday (~> 0.9) 350 | jwt (~> 1.5) 351 | multi_json (~> 1.10) 352 | slop (3.6.0) 353 | specinfra (2.66.3) 354 | net-scp 355 | net-ssh (>= 2.7, < 4.0) 356 | net-telnet 357 | sfl 358 | stringify-hash (0.0.2) 359 | thor (0.19.4) 360 | travis (1.8.5) 361 | backports 362 | faraday (~> 0.9) 363 | faraday_middleware (~> 0.9, >= 0.9.1) 364 | gh (~> 0.13) 365 | highline (~> 1.6) 366 | launchy (~> 2.1) 367 | pusher-client (~> 0.4) 368 | typhoeus (~> 0.6, >= 0.6.8) 369 | travis-lint (2.0.0) 370 | json 371 | trollop (2.1.2) 372 | typhoeus (0.8.0) 373 | ethon (>= 0.8.0) 374 | uber (0.0.15) 375 | unf (0.1.4) 376 | unf_ext 377 | unf_ext (0.0.7.2) 378 | vagrant-wrapper (2.0.3) 379 | websocket (1.2.3) 380 | xml-simple (1.1.5) 381 | xmlrpc (0.2.1) 382 | 383 | PLATFORMS 384 | ruby 385 | 386 | DEPENDENCIES 387 | beaker 388 | beaker-rspec 389 | guard-rake 390 | json (< 2.0.0) 391 | json_pure (< 2.0.0) 392 | puppet (~> 4.6.1) 393 | puppet-blacksmith 394 | puppet-lint (= 2.0.2) 395 | puppet-syntax 396 | puppetlabs_spec_helper 397 | rake (< 12.0.0) 398 | rspec-puppet! 399 | safe_yaml (~> 1.0.4) 400 | travis 401 | travis-lint 402 | vagrant-wrapper 403 | xmlrpc 404 | 405 | BUNDLED WITH 406 | 1.14.6 407 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | 3 | ## 4.0.0 4 | 5 | ### 2020-01-27 - Major Version Release 6 | 7 | ### PDK: Now Supported 8 | * This module is now compatible with the [PDK](https://puppet.com/docs/pdk/1.x/pdk.html) 9 | 10 | ### Class: `vmwaretools::install::exec` 11 | * The `/sbin/` path was missing from the install command for CentOS 6 - reported in [#89](https://github.com/craigwatson/puppet-vmwaretools/issues/89) by [fnollet](https://github.com/fnollet) 12 | 13 | ## Class: `vmwaretools::params` 14 | * Piping `yes` to the installer does not work with VMware Tools >= 10.0 - this has been fixed by using `-d -f` - reported in [#86](https://github.com/craigwatson/puppet-vmwaretools/pull/86) by [gabe-sky](https://github.com/gabe-sky) 15 | 16 | ## 3.0.1 17 | 18 | ### 2017-09-01 - Bugfix Release 19 | 20 | #### Class: `vmwaretools` 21 | * Fixing type regression for `$archive_md5` parameter 22 | 23 | ## 3.0.0 24 | 25 | ### 2017-03-10 - Major Version Release 26 | 27 | #### Puppet 3 Support Removed 28 | * This module no longer supports Puppet 3. If you require Puppet 3 functionality, please use version [2.4.1 from the Puppet Forge](https://forge.puppet.com/CraigWatson1987/vmwaretools/readme), or the [puppet3](https://github.com/craigwatson/puppet-vmwaretools/tree/puppet3) branch in Git. 29 | 30 | ## 2.4.1 31 | 32 | ### 2016-12-30 - Bugfix Release 33 | 34 | #### Class: `vmwaretools` 35 | * Fixing more stdlib deprecation warnings 36 | 37 | ## 2.4.0 38 | 39 | ### 2016-12-30 - Feature Release 40 | 41 | #### Class: `vmwaretools` 42 | * Fixing stdlib deprecation warnings 43 | 44 | #### Fact: `vmwaretools_version` 45 | * Adding fact output for vSphere 6.5 as reported in [#83](https://github.com/craigwatson/puppet-vmwaretools/issues/83) by [topei](https://github.com/toepi) 46 | 47 | ## 2.3.0 48 | 49 | ### 2016-06-20 - Feature Release 50 | 51 | #### Class: `vmwaretools` 52 | * New parameter: `clean_failed_downloads` (default: `false`). As requested in [#80](https://github.com/craigwatson/puppet-vmwaretools/issues/80), setting this to `true` will cause the HTTP download script to remove the downloaded copy of the archive on failure. **NOTE** that this will be default to `true` in a future release. 53 | 54 | #### Class: `vmwaretools::params` 55 | * Majorly reworked logic for `deploy_files` to fully remove `Unknown variable` warnings and odd deployment behaviour on Puppet 3. 56 | * Moved `download_vmwaretools` variable from main class 57 | 58 | #### Class: `vmwaretools::install::exec` 59 | * Do not require the `curl` package is `vmwaretools::manage_curl_pkgs` is `false` (possible dependency problem) 60 | 61 | #### Template: `download.sh.erb` 62 | * Adding failed download clean-up function 63 | * Making the script slightly more glob-proof 64 | 65 | #### Global 66 | * Using top-scope everywhere within the module 67 | 68 | ## 2.2.3 69 | 70 | ### 2016-06-17 - Bugfix Release 71 | 72 | #### Class: `vmwaretools::params` 73 | * Changing logic behind `deploy_files` parameter to fix `Unknown variable: 'deploy_files'` warnings 74 | 75 | #### Global 76 | * Fixing permissions issues reported in [#81](https://github.com/craigwatson/puppet-vmwaretools/issues/81) 77 | 78 | ## 2.2.2 79 | 80 | ### 2016-06-11 - Bugfix Release 81 | 82 | #### Class: `vmwaretools::install::package` 83 | * Now using stdlib's `ensure_packages` function rather than declaring packages manually to reduce the risk of collisions 84 | 85 | ## 2.2.1 86 | 87 | ### 2016-03-25 - Bugfix Release 88 | 89 | #### Class: `vmwaretools` 90 | * Fixing Puppet 4 issue with `undef` default value for `curl_proxy` parameter (new default - `false`) - thanks [dutsmiller](https://github.com/dutsmiller) for pull request [#79](https://github.com/craigwatson/puppet-vmwaretools/pull/79) 91 | 92 | ## 2.2.0 93 | 94 | ### 2016-03-14 - Feature Release 95 | 96 | #### Class: `vmwaretools` 97 | * New parameter: `curl_proxy` (default: `undef`). This controls the passing of proxy options to the download.sh script - thanks [dutsmiller](https://github.com/dutsmiller) for pull request [#78](https://github.com/craigwatson/puppet-vmwaretools/pull/78) 98 | 99 | #### Template: `download.sh.erb` 100 | * Optionally pass `-x` to `curl` 101 | 102 | ## 2.1.2 103 | 104 | ### 2015-09-10 - Bugfix Release 105 | 106 | #### Class: `vmwaretools::params` 107 | * Corrected double declaration of `open-vm-tools` package - thanks to [SyBernot](https://github.com/SyBernot) for pull request [#74](https://github.com/craigwatson/puppet-vmwaretools/pull/74). 108 | 109 | ## 2.1.1 110 | 111 | ### 2015-09-03 - Bugfix Release 112 | 113 | #### Class: `vmwaretools::params` 114 | * Adding packages to purge list, thanks to [Juan José Presa](https://github.com/juaningan) for PR [#73](https://github.com/craigwatson/puppet-vmwaretools/pull/73) (solves bug [#72](https://github.com/craigwatson/puppet-vmwaretools/issues/72)) - for full package list, see [params.pp](https://github.com/craigwatson/puppet-vmwaretools/blob/master/manifests/params.pp#L89). 115 | 116 | ## 2.1.0 117 | 118 | ### 2015-08-15 - Feature Release 119 | 120 | #### Class: `vmwaretools` 121 | * New parameter: `ignore_autodetect` - this will allow bypassing of the autodetection mechanism that only runs the module on certain platforms. Only useful for testing, 122 | defaults to `false`. 123 | 124 | #### Fact: `vmwaretools_version` 125 | * Removed the confine so that the fact now reports on non-VMware platforms. 126 | 127 | ## 2.0.1 128 | 129 | ### 2015-06-25 - Bugfix release 130 | 131 | #### Class: `vmwaretools::timesync` 132 | * Added dependency on Exec['vmware_config_tools'] if VMware Tools are being deployed this run - fixes [#71](https://github.com/craigwatson/puppet-vmwaretools/issues/71) 133 | 134 | ## 2.0.0 135 | 136 | ### 2015-05-14 - Major release 137 | 138 | #### Class: `vmwaretools` 139 | * Renamed `redhat_install_devel` parameter to `install_devel` to support SuSE-based OS families. 140 | 141 | #### Class: `vmwaretools::params` 142 | * Added support for installing development tools on SuSE-based OS families. 143 | 144 | #### Class: `vmwaretools::install` 145 | * Moved working directory declaration into this subclass to cut down on logic sprawl. 146 | * Changed "arrow" relationship to explicit `require` parameters. 147 | 148 | #### Class: `vmwaretools::config` 149 | * Removed. 150 | 151 | ## 1.4.1 152 | 153 | ### 2015-05-05 - Bug Fix 154 | 155 | #### Fact: `esx_version` 156 | * Updated `dmidecode` values and version numbers 157 | 158 | ## 1.4.0 159 | 160 | ### 2015-04-13 - Feature Release 161 | 162 | #### Class: `vmwaretools` 163 | * Added new `force_install` parameter to trigger echoing 'yes' to the VMware Tools install script. Thanks to [Anthony Somerset](https://github.com/anthonysomerset) and [Mattias Geniar](https://github.com/mattiasgeniar) for the help with the issue! 164 | 165 | #### Class: `vmwaretools::params` 166 | * Adding new parameter `$install_command` to handle adding the `echo` if `force_install` is passed to the module. 167 | 168 | #### Class: `vmwaretools::install::exec` 169 | * Changed the `install_vmwaretools` exec resource to use the new `$vmwaretools::params::install_command` variable. 170 | 171 | #### Fact: `esx_version` 172 | * Added ESXi 6 to the list 173 | 174 | ## 1.3.1 175 | 176 | ### 2015-02-09 - Bugfix Release 177 | 178 | #### Class: `vmwaretools` 179 | * Fixed bug where facter passing literal boolean was causing `str2bool` to fail - thanks to Arkadi Colson for reporting the bug! 180 | 181 | ## 1.3.0 182 | 183 | ### 2015-01-30 - Feature Release 184 | 185 | ### Class: `vmwaretools` 186 | * Added parameters to manage the installation of certain supporting packages - thanks to [Aaron Hicks](https://github.com/Aethylred) for Pull Request [#60](https://github.com/craigwatson/puppet-vmwaretools/pull/60) 187 | 188 | ### Class: `vmwaretools::install::package` 189 | * Adjusted class to use above parameters 190 | 191 | ## 1.2.0 192 | 193 | ### 2014-12-09 - Feature Release 194 | 195 | #### Class: `vmwaretools` 196 | * Added `prevent_upgrade` parameter to does not deploy files if the Puppet version is higher than the installed version) 197 | * Modified the regex for how to download vmwaretools to fix a Lint issue with the previous syntax 198 | * Huge thanks to [esalberg](https://github.com/esalberg) for Pull Request [#58](https://github.com/craigwatson/puppet-vmwaretools/pull/58)! 199 | 200 | ## 1.1.0 201 | 202 | ### 2014-10-02 - Feature Release 203 | 204 | #### Class: `vmwaretools::params` 205 | * Added `vmware-tools-foundation` to purge_package_list to fully remove OSP tools - thanks to [Christian Groschupp](https://github.com/cgroschupp) 206 | * Added `purge_list_ensure` variable to work around bug in Puppet's yum provider, see these bugs: [1](https://projects.puppetlabs.com/issues/2833), [2](https://projects.puppetlabs.com/issues/11450), [3](https://tickets.puppetlabs.com/browse/PUP-1198) - thanks to [Justin T.](https://github.com/thesysadm) for PR [#53](https://github.com/craigwatson/puppet-vmwaretools/pull/53) 207 | 208 | #### Class: `vmwaretools::install::package` 209 | * Implemented `purge_list_ensure` as per above bug-fix 210 | 211 | #### Template: `download.sh.erb` 212 | * Redirect error output to standard error, and exit early if the download fails - thanks to [Christian Groschupp](https://github.com/cgroschupp) 213 | 214 | #### Change Log 215 | * Major overhaul and Markdown prettification! 216 | 217 | #### Readme 218 | * Minor Markdown formatting changes 219 | 220 | ## 1.0.1 221 | 222 | ### 2014-10-01 - Bugfix Release 223 | 224 | #### Class: `vmwaretools` 225 | * Fixed regression bug [#51](https://github.com/craigwatson/puppet-vmwaretools/issues/51) caused by facts being returned as strings, using stdlib's str2bool function - thanks [Justin T.](https://github.com/thesysadm)! 226 | 227 | ## 1.0.0 228 | 229 | ### 2014-09-24 - Major Release 230 | 231 | #### Module-wide changes 232 | * 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. 233 | * This module is now dependant on [PuppetLabs' stdlib module](https://github.come/puppetlabs/puppetlabs-stdlib). Please make sure this module is available within your Puppet codebase. 234 | 235 | #### Fact: `vmwaretools` 236 | * Fixes `vmwaretools` fact detection for failed tools installs - thanks [Markus Frosch](https://github.com/lazyfrosch) for [pull request #49](https://github.com/craigwatson/puppet-vmwaretools/pull/49)! 237 | 238 | #### Class: `vmwaretools` 239 | * `open-vm-tools` is now `purged` rather than just `absent` - thanks [Markus Frosch](https://github.com/lazyfrosch) for [pull request #49](https://github.com/craigwatson/puppet-vmwaretools/pull/49)! 240 | 241 | ## 0.4.3 242 | 243 | ### 2014-09-08 - Bugfix Release 244 | 245 | #### Class: `vmwaretools` 246 | * We now only parse the module on Linux kernels, fixes [ticket #47](https://github.com/craigwatson/puppet-vmwaretools/pull/47), thanks to [thesysadm](https://github.com/thesysadm)! 247 | 248 | ## 0.4.2 249 | 250 | ### 2014-08-06 - Bugfix Release 251 | 252 | #### Class: `vmwaretools::params` 253 | * Adding new parameter for RH 5.x PAE/xen kernels for kernel-devel package (thanks Mark Stunnenberg!) 254 | * Adding new parameter for the list of packages to purge 255 | 256 | #### Class: `vmwaretools::install::package` 257 | * Only installing `build-essential` on Debian - [pull request #43](https://github.com/craigwatson/puppet-vmwaretools/pull/43) 258 | * Changing RedHat `kernel-devel` package name to account for PAE/xen kernels on RH 5.x (thanks Mark Stunnenberg!) 259 | * Adding `open-vm-tools-desktop` to list of packages to purge 260 | 261 | ## 0.4.1 262 | 263 | ### 2014-06-20 - Bugfix Release 264 | 265 | #### Class: `vmwaretools` 266 | * Removing `config_creates` override 267 | * Documentation syntax correction - [pull request #42](https://github.com/craigwatson/puppet-vmwaretools/pull/42) 268 | * Added check fof the `vmwaretools_version` fact - the module will hard-fail if this cannot be found 269 | 270 | #### Class: `vmwaretools::params` 271 | * Remvoing `config_creates` references 272 | 273 | #### Class: `vmwaretools::config_tools` 274 | * Replacing `creates` paramter with a more straightforward `unless` check using lsmod to check for the vmci kernel module that should be installed when vmware-config-tools.pl runs 275 | 276 | ## 0.4.0 277 | 278 | ### 2014-05-16 - Feature Release 279 | 280 | #### Class: `vmwaretools` 281 | * Improving support for downloading VMware Tools via external Puppet modules (thanks to [Sam Keeley](https://github.com/keeleysam) and [Aedu](https://github.com/Aedu) for Pull Requests [#36](https://github.com/craigwatson/puppet-vmwaretools/pull/36) and [#37](https://github.com/craigwatson/puppet-vmwaretools/pull/37) respectively) 282 | 283 | #### Class: `vmwaretools::params` 284 | * Adding Ubuntu 10.04 LTC (Lucid Lynx) override for `config_creates_real` variable 285 | 286 | ## 0.3.1 287 | 288 | ### 2014-04-14 - Bugfix Release 289 | 290 | #### Class: `vmwaretools::params` 291 | * Correcting typo in config_creates assignment 292 | 293 | ## 0.3.0 294 | 295 | ### 2014-04-14 - Feature Release 296 | 297 | #### Class: `vmwaretools` main 298 | * Adding `config_creates` parameter to main class declaration 299 | 300 | #### Class: `vmwaretools::params` 301 | * Renaming `config_creates` to `config_creates_real` 302 | * Adding case statement for Ubuntu/Debian within the Debian osfamily case 303 | 304 | #### Class: `vmwaretools::config_tools` 305 | * Using vmwaretools::params::config_creates_real instead of vmwaretools::params::config_creates 306 | 307 | ## 0.2.5 308 | 309 | ### 2014-04-10 - Bugfix Release 310 | 311 | #### Class: `vmwaretools` 312 | * Facter facts are strings, not literal booleans! 313 | 314 | ## 0.2.4 315 | 316 | ### 2014-04-09 - Bugfix Release 317 | 318 | #### Class: `vmwaretools` 319 | * 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!) 320 | 321 | ## 0.2.3 322 | 323 | ### 2014-04-07 - Bugfix Release 324 | 325 | #### Class: `vmwaretools::install::package` 326 | * We now remove the vmware-tools-services package as well as open-vm-tools - [pull request #34](https://github.com/craigwatson/puppet-vmwaretools/pull/34) and packages are now purged rather than removed 327 | 328 | #### Class: `vmwaretools::params` 329 | * `config_creates` is now different across Debian and RedHat osfamilys - [pull request #34](https://github.com/craigwatson/puppet-vmwaretools/pull/34) 330 | 331 | ## 0.2.2 332 | 333 | ### 2014-03-05 - Bugfix Release 334 | 335 | #### Class: `vmwaretools::install` 336 | * Packages will now be purged/installed all the time, not just when we install VMware Tools -- raised by [cdenneen](https://github.com/cdenneen) in [bug #27](https://github.com/craigwatson/puppet-vmwaretools/issues/27) 337 | 338 | #### Template: `download.sh.erb` 339 | * Added removal of the archive on an MD5 mismatch - raised by [herwigbogaert](https://github.com/herwigbogaert) in [bug #30](https://github.com/craigwatson/puppet-vmwaretools/issues/30) 340 | 341 | ## 0.2.1 342 | 343 | ### 2013-10-31 - Feature Release (non-SemVer) 344 | 345 | #### Fact: `esx_version` 346 | * Adding support for vSphere 5.5. Thanks to [Ryan McKern](https://github.com/mckern) for the pull request [GitHub Issue #18](https://github.com/craigwatson/puppet-vmwaretools/pull/22)! 347 | 348 | ## 0.2.0 349 | 350 | ### 2013-09-11 - Feature Release 351 | 352 | #### Fact: `esx_version` 353 | * New fact: reports the version of vSphere. 354 | 355 | #### Class: `vmwaretools::timesync` 356 | * New class: Handles management of time sychronisation with vSphere. Thanks to [Aaron Hicks](https://github.com/Aethylred) for the pull request [GitHub Issue #18](https://github.com/craigwatson/puppet-vmwaretools/pull/18)! 357 | 358 | #### Class: `vmwaretools::config_tools` 359 | * Renamed class: was previously `vmwaretools::kernel_upgrade` 360 | 361 | #### Class: `vmwaretools` 362 | * New parameter: timesync. This paramter enables/disables the timesync feature of the VMware Tools. 363 | * Defaults to undef (literal), which will leave time synchronisation unmanaged. 364 | * Valid managed values are true to enable timesync and false to disable timesync, both literal booleans. 365 | 366 | ## 0.1.2 367 | 368 | ### 2013-06-20 - Bugfix Release 369 | 370 | #### Class: `vmwaretools::params` 371 | * Moving back to `vmci.ko` - see discussion on [GitHub Issue #14](https://github.com/craigwatson/puppet-vmwaretools/pull/14), huge thanks to [Ryan McKern](https://github.com/mckern) for the investigative work! 372 | 373 | ## 0.1.1 374 | 375 | ### 2013-06-19 - Bugfix Release 376 | 377 | #### Readme 378 | * Adding Ubuntu 13.04 to Unsupported Operating Systems 379 | 380 | #### Class: `vmwaretools` 381 | * Now fails when run on Ubuntu 13.04 (Raring) 382 | 383 | #### Class: `vmwaretools::kernel_upgrade` 384 | * Moving `creates` attribute to `/lib/modules/${::kernelrelease}/kernel/drivers/scsi/vmw_pvscsi.ko` as suggested in [bug #12](https://github.com/craigwatson/puppet-vmwaretools/issues/12) 385 | 386 | ## 0.1.0 387 | 388 | ### 2013-05-17 - Feature Release 389 | 390 | #### Fact: `vmwaretools_version` 391 | * Added "not installed" output if VMware Tools isn't installed 392 | 393 | #### Class: `vmwaretools::kernel_upgrade` 394 | * New class: handles re-compiling VMware Tools following a kernel upgrade 395 | 396 | #### Class: `vmwaretools::install::package` 397 | * Installing `curl` if download script is used. 398 | * Adding `open-vm-dkms` to the list of purged packages 399 | * Making the `kernel-devel` package installation explicitly use the running kernel - [pull request #8](https://github.com/craigwatson/puppet-vmwaretools/pull/8) by [mattiasgeniar](https://github.com/mattiasgeniar) 400 | 401 | #### Class: `vmwaretools` 402 | * New parameter: `prevent_downgrade`, prevents downgrading if the version installed is newer than intended Puppet-deployed version (default: `true`) 403 | 404 | #### Template: `download.sh.erb` 405 | * Using `awk` path from `vmwaretools::params` in script, and using `curl` rather than `wget` - [pull request #7](https://github.com/craigwatson/puppet-vmwaretools/pull/7) by [mattiasgeniar](https://github.com/mattiasgeniar) 406 | 407 | ## 0.0.5 408 | 409 | ### 2013-05-07 - Bugfix Release 410 | 411 | #### Class: `vmwaretools::install::exec` 412 | * `archive_location` replaced by `archive_url` 413 | 414 | #### Class: `vmwaretools` 415 | * Parameter Typo fixed 416 | 417 | ##0.0.4 418 | 419 | ### 2013-05-03 420 | * Including new README format and starting Changelogs. 421 | --------------------------------------------------------------------------------