Skip to content

Commit

Permalink
(#14) Various long-overdue fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Vincent committed Jun 25, 2019
1 parent f4e4a10 commit 4fb92ca
Show file tree
Hide file tree
Showing 48 changed files with 387 additions and 334 deletions.
1 change: 1 addition & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
fixtures:
repositories:
stdlib: "https://github.com/puppetlabs/puppetlabs-stdlib.git"
epel: "https://github.com/stahnma/puppet-module-epel.git"
symlinks:
openvmtools: "#{source_dir}"
27 changes: 7 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,12 @@ script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake
matrix:
fast_finish: true
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.0"
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
allow_failures:
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.1.9
env: PUPPET_GEM_VERSION="~> 4.0"
- rvm: 2.4.1
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.5.0
env: PUPPET_GEM_VERSION="~> 6.0"
notifications:
email:
- github@razorsedge.org
- voxpupuli@groups.io
81 changes: 21 additions & 60 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,85 +4,46 @@ Contributing
normal

1. [Fork](http://help.github.com/forking/) puppet-openvmtools.
2. Create a topic branch against the develop branch. `git checkout develop; git checkout -b my_branch`
2. Create a topic branch against the master branch.
`git checkout -b my_branch`
3. Make your change.
4. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
5. Run the tests. We only take pull requests with passing tests. `bundle exec rake spec SPEC_OPTS='--format documentation'`
4. Add a test for your change. Only refactoring and documentation changes
require no new tests. If you are adding functionality or fixing a bug,
please add a test.
5. Run the tests. We only take pull requests with passing tests.
`bundle exec rake spec SPEC_OPTS='--format documentation'`
6. Add or update documentation.
7. Squash your commits down into logical components. Make sure to rebase against the current `develop` branch. `git pull --rebase upstream develop`
7. Squash your commits down into logical components. Make sure to rebase
against the current `master` branch. `git pull --rebase upstream master`
8. Push to your branch. `git push origin my_branch`
9. Create a [Pull Request](http://help.github.com/pull-requests/) from your branch against the develop branch.

[git-flow](https://github.com/nvie/gitflow)

1. [Fork](http://help.github.com/forking/) puppet-openvmtools.
2. Create a feature. `git flow feature start my-feature`
3. Make your change.
4. Add a test for your change. Only refactoring and documentation changes require no new tests. If you are adding functionality or fixing a bug, please add a test.
5. Run the tests. We only take pull requests with passing tests. `bundle exec rake spec SPEC_OPTS='--format documentation'`
6. Add or update documentation.
7. Squash your commits down into logical components. Make sure to rebase against the current `develop` branch. `git pull --rebase upstream develop`
8. Publish your featue. `git flow feature publish my-feature`
9. Create a [Pull Request](http://help.github.com/pull-requests/) from your branch against the develop branch.
9. Create a [Pull Request](http://help.github.com/pull-requests/) from your
branch against the master branch.

Testing
-------

Tests are written with [rspec-puppet](http://rspec-puppet.com/). CI is covered by [Travis CI](http://about.travis-ci.org/) and the current status is visible [here](http://travis-ci.org/razorsedge/puppet-openvmtools).
Tests are written with [rspec-puppet](http://rspec-puppet.com/). CI is covered
by [Travis CI](http://about.travis-ci.org/).

To install the test system, pick one of the following:

PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0" bundle install --path=.vendor --without system_tests
PUPPET_GEM_VERSION="~> 3.0" bundle install --path=.vendor --without system_tests
PUPPET_GEM_VERSION="~> 4.0" bundle install --path=.vendor --without system_tests
PUPPET_GEM_VERSION="~> 5.0" bundle install --path=.vendor --without system_tests
PUPPET_GEM_VERSION="~> 6.0" bundle install --path=.vendor --without system_tests

To run all tests:

bundle exec rake validate && \
bundle exec rake lint && \
bundle exec rake metadata_lint && \
bundle exec rake spec SPEC_OPTS='--format documentation' FUTURE_PARSER="yes" STRICT_VARIABLES="no"

Branching
---------

This repository is organized and maintained with the help of [gitflow](https://github.com/nvie/gitflow). Developers are encouraged to use it when working with this repository.

We use the following naming convention for branches:

* develop (during development)
* master (will be or has been released)
* feature/<name> (feature branches)
* release/<name> (release branches)
* hotfix/<name> (hotfix branches)
* (empty version prefix)

During development, you should work in feature branches instead of committing to master directly. Tell gitflow that you want to start working on a feature and it will do the work for you (like creating a branch prefixed with feature/):

git flow feature start <FEATURE_NAME>
bundle exec rake spec SPEC_OPTS='--format documentation' \
FUTURE_PARSER="yes" STRICT_VARIABLES="no"

The work in a feature branch should be kept close to the original problem. Tell gitflow that a feature is finished and it will merge it into master and push it to the upstream repository:

git flow feature finish <FEATURE_NAME>

Even before a feature is finished, you might want to make your branch available to other developers. You can do that by publishing it, which will push it to the upstream repository:

git flow feature publish <FEATURE_NAME>

To track a feature that is located in the upstream repository and not yet present locally, invoke the following command:

git flow feature track <FEATURE_NAME>

Changes that should go into production should come from the up-to-date master branch. Enter the "release to production" phase by running:

git flow release start <VERSION_NUMBER>

In this phase, only meta information should be touched, like bumping the version and update the history. Finish the release phase with:

git flow release finish <VERSION_NUMBER>

Versioning
----------

This project is versioned with the help of the [Semantic Versioning Specification](http://semver.org/) using 0.0.1 as the initial version. Please make sure you have read the guidelines before increasing a version number either for a release or a hotfix.

This project is versioned with the help of the
[Semantic Versioning Specification](http://semver.org/) using 0.0.1 as the
initial version. Please make sure you have read the guidelines before increasing
a version number either for a release or a hotfix.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2015 Mike Arnold <mike@razorsedge.org>
Copyright (C) 2017 Vox Pupuli <voxpupuli@groups.io>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
27 changes: 9 additions & 18 deletions README.markdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Open Virtual Machine Tools

[![Build Status](https://secure.travis-ci.org/razorsedge/puppet-openvmtools.png?branch=master)](http://travis-ci.org/razorsedge/puppet-openvmtools)

#### Table of Contents
## Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
Expand Down Expand Up @@ -135,31 +133,24 @@ Default: vmtoolsd
open-vm-tools is available with these operating systems:

* Debian 7.x and later releases
* Recent Ubuntu releases (12.04 LTS, 13.10 and later)
* Ubuntu 12.04 LTS and later releases
* openSUSE 11.x and later releases
* SUSE Linux Enterprise 12 and later releases
* Fedora 19 and later releases
* Red Hat Enterprise Linux 7.0 and later releases
* CentOS 7
* Oracle Linux 7

### Notes:

* No other VM tools (ie [Operating System Specific Packages](http://packages.vmware.com/)) will be supported. Use [razorsedge/vmwaretools](https://forge.puppetlabs.com/razorsedge/vmwaretools) instead.

### Issues:

* None
* Red Hat Enterprise Linux 6.0 and later releases
* CentOS 6 and later releases
* Oracle Linux 6 and later releases
* FreeBSD 10 and later releases

## Development

Please see [CONTRIBUTING.md](CONTRIBUTING.md) for information on how to contribute.

Copyright (C) 2015 Mike Arnold <mike@razorsedge.org>
Copyright (C) 2017 Vox Pupuli

Licensed under the Apache License, Version 2.0.

[razorsedge/puppet-openvmtools on GitHub](https://github.com/razorsedge/puppet-openvmtools)
[voxpupuli/puppet-openvmtools on GitHub](https://github.com/voxpupuli/puppet-openvmtools)

[razorsedge/openvmtools on Puppet Forge](https://forge.puppetlabs.com/razorsedge/openvmtools)
[voxpupuli/openvmtools on Puppet Forge](https://forge.puppetlabs.com/voxpupuli/openvmtools)

3 changes: 3 additions & 0 deletions data/Debian.Debian.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Debian.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Debian.9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Ubuntu.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Ubuntu.14.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Ubuntu.16.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Debian.Ubuntu.18.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
5 changes: 5 additions & 0 deletions data/Debian.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

openvmtools::desktop_package_name: 'open-vm-toolbox'
openvmtools::service_name: 'open-vm-tools'
openvmtools::service_hasstatus: false
3 changes: 3 additions & 0 deletions data/FreeBSD.FreeBSD.10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/FreeBSD.FreeBSD.11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/FreeBSD.FreeBSD.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
6 changes: 6 additions & 0 deletions data/FreeBSD.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---

openvmtools::desktop_package_conflicts: true
openvmtools::desktop_package_name: 'open-vm-tools'
openvmtools::package_name: 'open-vm-tools-nox11'
openvmtools::service_name: 'vmware-guestd'
4 changes: 4 additions & 0 deletions data/RedHat.Centos.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

openvmtools::manage_epel: true
openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Centos.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Centos.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.19.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.20.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.21.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.22.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.23.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.24.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.Fedora.25.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
4 changes: 4 additions & 0 deletions data/RedHat.OracleLinux.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

openvmtools::manage_epel: true
openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.OracleLinux.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.OracleLinux.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
4 changes: 4 additions & 0 deletions data/RedHat.RedHat.6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

openvmtools::manage_epel: true
openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.RedHat.7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/RedHat.RedHat.8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.OpenSUSE.11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.OpenSUSE.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.OpenSUSE.13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.OpenSUSE.15.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.OpenSUSE.42.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.SLES.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.SLES.13.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.SLES.14.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
3 changes: 3 additions & 0 deletions data/Suse.SLES.15.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---

openvmtools::supported: true
15 changes: 15 additions & 0 deletions hiera.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---

defaults:
datadir: data
data_hash: yaml_data

hierarchy:
- name: 'OS Major Version'
path: '%{facts.os.family}.%{facts.os.name}.%{facts.os.release.major}.yaml'
- name: 'OS Name'
path: '%{facts.os.family}.%{facts.os.name}.yaml'
- name: 'OS Family'
path: '%{facts.os.family}.yaml'

version: 5
10 changes: 10 additions & 0 deletions lib/facter/vmware_uninstaller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Fact to discover the VMwareTools uninstaller path, if any.

Facter.add(:vmware_uninstaller) do
confine :kernel do |os|
os != "windows"
end
setcode do
Facter::Core::Execution.which('vmware-uninstall-tools.pl')
end
end
Loading

0 comments on commit 4fb92ca

Please sign in to comment.