changeset 245:b0f8b88fea5c

Add "translate" module used by MySQL module
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Dec 2019 14:12:10 -0500
parents 48d3a1948e4d
children c3fa3d65aa83
files modules/translate/CHANGELOG.md modules/translate/CONTRIBUTING.md modules/translate/Gemfile modules/translate/HISTORY.md modules/translate/LICENSE modules/translate/MAINTAINERS.md modules/translate/NOTICE modules/translate/README.md modules/translate/REFERENCE.md modules/translate/Rakefile modules/translate/checksums.json modules/translate/distelli-manifest.yml modules/translate/lib/puppet/functions/translate.rb modules/translate/locales/config.yaml modules/translate/metadata.json modules/translate/provision.yaml modules/translate/spec/acceptance/spec_helper_acceptance.rb modules/translate/spec/acceptance/translate_spec.rb modules/translate/spec/default_facts.yml modules/translate/spec/functions/translate_spec.rb modules/translate/spec/spec_helper.rb modules/translate/spec/spec_helper_local.rb
diffstat 22 files changed, 1217 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/CHANGELOG.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,75 @@
+# Change log
+
+All 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).
+
+## [v2.1.0](https://github.com/puppetlabs/puppetlabs-translate/tree/v2.1.0) (2019-11-29)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-translate/compare/v2.0.0...v2.1.0)
+
+### Added
+
+- \(FM-8682\) - Addition of Support for CentOS 8 [\#59](https://github.com/puppetlabs/puppetlabs-translate/pull/59) ([david22swan](https://github.com/david22swan))
+- FM-8414  - Add support on Debian 10 [\#52](https://github.com/puppetlabs/puppetlabs-translate/pull/52) ([lionce](https://github.com/lionce))
+
+## [v2.0.0](https://github.com/puppetlabs/puppetlabs-translate/tree/v2.0.0) (2019-06-13)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-translate/compare/1.2.0...v2.0.0)
+
+### Changed
+
+- pdksync - \(MODULES-8444\) - Raise lower Puppet bound [\#39](https://github.com/puppetlabs/puppetlabs-translate/pull/39) ([david22swan](https://github.com/david22swan))
+- \(FM-7711\) - Remove Debian 7 testing/support for Translate module [\#31](https://github.com/puppetlabs/puppetlabs-translate/pull/31) ([david22swan](https://github.com/david22swan))
+
+### Added
+
+- \(FM-8034\) Add RedHat 8 support [\#42](https://github.com/puppetlabs/puppetlabs-translate/pull/42) ([eimlav](https://github.com/eimlav))
+- \[FM-7939\] Puppet Strings [\#41](https://github.com/puppetlabs/puppetlabs-translate/pull/41) ([carabasdaniel](https://github.com/carabasdaniel))
+- \(FM-7720/FM-7722/FM-7723\) - Update to windows support [\#33](https://github.com/puppetlabs/puppetlabs-translate/pull/33) ([david22swan](https://github.com/david22swan))
+
+### Fixed
+
+- pdksync - \(FM-7655\) Fix rubygems-update for ruby \< 2.3 [\#28](https://github.com/puppetlabs/puppetlabs-translate/pull/28) ([tphoney](https://github.com/tphoney))
+
+## [1.2.0](https://github.com/puppetlabs/puppetlabs-translate/tree/1.2.0) (2018-09-27)
+
+[Full Changelog](https://github.com/puppetlabs/puppetlabs-translate/compare/1.1.0...1.2.0)
+
+### Added
+
+- Update metadata.json for Puppet 6 support [\#23](https://github.com/puppetlabs/puppetlabs-translate/pull/23) ([eimlav](https://github.com/eimlav))
+- pdksync - \(FM-7392\) - Puppet 6 Testing Changes [\#22](https://github.com/puppetlabs/puppetlabs-translate/pull/22) ([pmcmaw](https://github.com/pmcmaw))
+
+### Fixed
+
+- \(MODULES-7728\) - Reading beaker-hostgenerator and nokogiri gem [\#20](https://github.com/puppetlabs/puppetlabs-translate/pull/20) ([pmcmaw](https://github.com/pmcmaw))
+
+## 1.1.0
+### Summary
+A small addition release including a bump to the Puppet version requirements.
+
+#### Changed
+-  Updated the Puppet version to correctly reflect which version of Puppet includes the translation updates.
+
+#### Added
+- Adding acceptance test directory along with several nodesets for testing.
+- Addition of several files including maintainers, contributing and an update to existing Rakefiles and .travis files.
+
+## Supported Release [1.0.0]
+### Summary
+This is a feature release that includes support for interpolated strings.
+
+#### Added
+- support for passing strings that use interpolation to the `translate` function
+
+#### Removed
+- Debian 6 support
+
+## Supported Release [0.1.0]
+### Summary
+This is the initial release.
+
+[1.0.0]:https://github.com/puppetlabs/puppetlabs-translate/compare/0.1.0...1.0.0
+[0.1.0]:https://github.com/puppetlabs/puppetlabs-translate/commits/0.1.0
+
+
+\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/CONTRIBUTING.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,271 @@
+# Contributing to Puppet modules
+
+So you want to contribute to a Puppet module: Great! Below are some instructions to get you started doing
+that very thing while setting expectations around code quality as well as a few tips for making the
+process as easy as possible. 
+
+### Table of Contents
+
+1. [Getting Started](#getting-started)
+1. [Commit Checklist](#commit-checklist)
+1. [Submission](#submission)
+1. [More about commits](#more-about-commits)
+1. [Testing](#testing)
+    - [Running Tests](#running-tests)
+    - [Writing Tests](#writing-tests)
+1. [Get Help](#get-help)
+
+## Getting Started
+
+- Fork the module repository on GitHub and clone to your workspace
+
+- Make your changes!
+
+## Commit Checklist
+
+### The Basics
+
+- [x] my commit is a single logical unit of work
+
+- [x] I have checked for unnecessary whitespace with "git diff --check" 
+
+- [x] my commit does not include commented out code or unneeded files
+
+### The Content
+
+- [x] my commit includes tests for the bug I fixed or feature I added
+
+- [x] my commit includes appropriate documentation changes if it is introducing a new feature or changing existing functionality
+    
+- [x] my code passes existing test suites
+
+### The Commit Message
+
+- [x] the first line of my commit message includes:
+
+  - [x] an issue number (if applicable), e.g. "(MODULES-xxxx) This is the first line" 
+  
+  - [x] a short description (50 characters is the soft limit, excluding ticket number(s))
+
+- [x] the body of my commit message:
+
+  - [x] is meaningful
+
+  - [x] uses the imperative, present tense: "change", not "changed" or "changes"
+
+  - [x] includes motivation for the change, and contrasts its implementation with the previous behavior
+
+## Submission
+
+### Pre-requisites
+
+- Make sure you have a [GitHub account](https://github.com/join)
+
+- [Create a ticket](https://tickets.puppet.com/secure/CreateIssue!default.jspa), or [watch the ticket](https://tickets.puppet.com/browse/) you are patching for.
+
+### Push and PR
+
+- Push your changes to your fork
+
+- [Open a Pull Request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) against the repository in the puppetlabs organization
+
+## More about commits 
+
+  1.  Make separate commits for logically separate changes.
+
+      Please break your commits down into logically consistent units
+      which include new or changed tests relevant to the rest of the
+      change.  The goal of doing this is to make the diff easier to
+      read for whoever is reviewing your code.  In general, the easier
+      your diff is to read, the more likely someone will be happy to
+      review it and get it into the code base.
+
+      If you are going to refactor a piece of code, please do so as a
+      separate commit from your feature or bug fix changes.
+
+      We also really appreciate changes that include tests to make
+      sure the bug is not re-introduced, and that the feature is not
+      accidentally broken.
+
+      Describe the technical detail of the change(s).  If your
+      description starts to get too long, that is a good sign that you
+      probably need to split up your commit into more finely grained
+      pieces.
+
+      Commits which plainly describe the things which help
+      reviewers check the patch and future developers understand the
+      code are much more likely to be merged in with a minimum of
+      bike-shedding or requested changes.  Ideally, the commit message
+      would include information, and be in a form suitable for
+      inclusion in the release notes for the version of Puppet that
+      includes them.
+
+      Please also check that you are not introducing any trailing
+      whitespace or other "whitespace errors".  You can do this by
+      running "git diff --check" on your changes before you commit.
+
+  2.  Sending your patches
+
+      To submit your changes via a GitHub pull request, we _highly_
+      recommend that you have them on a topic branch, instead of
+      directly on "master".
+      It makes things much easier to keep track of, especially if
+      you decide to work on another thing before your first change
+      is merged in.
+
+      GitHub has some pretty good
+      [general documentation](http://help.github.com/) on using
+      their site.  They also have documentation on
+      [creating pull requests](https://help.github.com/articles/creating-a-pull-request-from-a-fork/).
+
+      In general, after pushing your topic branch up to your
+      repository on GitHub, you can switch to the branch in the
+      GitHub UI and click "Pull Request" towards the top of the page
+      in order to open a pull request.
+
+  3.  Update the related JIRA issue.
+
+      If there is a JIRA issue associated with the change you
+      submitted, then you should update the ticket to include the
+      location of your branch, along with any other commentary you
+      may wish to make.
+
+# Testing
+
+## Getting Started
+
+Our Puppet modules provide [`Gemfile`](./Gemfile)s, which can tell a Ruby package manager such as [bundler](http://bundler.io/) what Ruby packages,
+or Gems, are required to build, develop, and test this software.
+
+Please make sure you have [bundler installed](http://bundler.io/#getting-started) on your system, and then use it to 
+install all dependencies needed for this project in the project root by running
+
+```shell
+% bundle install --path .bundle/gems
+Fetching gem metadata from https://rubygems.org/........
+Fetching gem metadata from https://rubygems.org/..
+Using rake (10.1.0)
+Using builder (3.2.2)
+-- 8><-- many more --><8 --
+Using rspec-system-puppet (2.2.0)
+Using serverspec (0.6.3)
+Using rspec-system-serverspec (1.0.0)
+Using bundler (1.3.5)
+Your bundle is complete!
+Use `bundle show [gemname]` to see where a bundled gem is installed.
+```
+
+NOTE: some systems may require you to run this command with sudo.
+
+If you already have those gems installed, make sure they are up-to-date:
+
+```shell
+% bundle update
+```
+
+## Running Tests
+
+With all dependencies in place and up-to-date, run the tests:
+
+### Unit Tests
+
+```shell
+% bundle exec rake spec
+```
+
+This executes all the [rspec tests](http://rspec-puppet.com/) in the directories defined [here](https://github.com/puppetlabs/puppetlabs_spec_helper/blob/699d9fbca1d2489bff1736bb254bb7b7edb32c74/lib/puppetlabs_spec_helper/rake_tasks.rb#L17) and so on. 
+rspec tests may have the same kind of dependencies as the module they are testing. Although the module defines these dependencies in its [metadata.json](./metadata.json),
+rspec tests define them in [.fixtures.yml](./fixtures.yml).
+
+### Acceptance Tests
+
+Some Puppet modules also come with acceptance tests, which use [beaker][]. These tests spin up a virtual machine under
+[VirtualBox](https://www.virtualbox.org/), controlled with [Vagrant](http://www.vagrantup.com/), to simulate scripted test
+scenarios. In order to run these, you need both Virtualbox and Vagrant installed on your system.
+
+Run the tests by issuing the following command
+
+```shell
+% bundle exec rake spec_clean
+% bundle exec rspec spec/acceptance
+```
+
+This will now download a pre-fabricated image configured in the [default node-set](./spec/acceptance/nodesets/default.yml),
+install Puppet, copy this module, and install its dependencies per [spec/spec_helper_acceptance.rb](./spec/spec_helper_acceptance.rb)
+and then run all the tests under [spec/acceptance](./spec/acceptance).
+
+## Writing Tests
+
+### Unit Tests
+
+When writing unit tests for Puppet, [rspec-puppet][] is your best friend. It provides tons of helper methods for testing your manifests against a 
+catalog (e.g. contain_file, contain_package, with_params, etc). It would be ridiculous to try and top rspec-puppet's [documentation][rspec-puppet_docs] 
+but here's a tiny sample:
+
+Sample manifest:
+
+```puppet
+file { "a test file":
+  ensure => present,
+  path   => "/etc/sample",
+}
+```
+
+Sample test:
+
+```ruby
+it 'does a thing' do
+  expect(subject).to contain_file("a test file").with({:path => "/etc/sample"})
+end
+```
+
+### Acceptance Tests
+
+Writing acceptance tests for Puppet involves [beaker][] and its cousin [beaker-rspec][]. A common pattern for acceptance tests is to create a test manifest, apply it
+twice to check for idempotency or errors, then run expectations.
+
+```ruby
+it 'does an end-to-end thing' do
+  pp = <<-EOF
+    file { 'a test file': 
+      ensure  => present,
+      path    => "/etc/sample",
+      content => "test string",
+    }
+    
+  apply_manifest(pp, :catch_failures => true)
+  apply_manifest(pp, :catch_changes => true)
+  
+end
+
+describe file("/etc/sample") do
+  it { is_expected.to contain "test string" }
+end
+
+```
+
+# If you have commit access to the repository
+
+Even if you have commit access to the repository, you still need to go through the process above, and have someone else review and merge
+in your changes.  The rule is that **all changes must be reviewed by a project developer that did not write the code to ensure that
+all changes go through a code review process.**
+
+The record of someone performing the merge is the record that they performed the code review. Again, this should be someone other than the author of the topic branch.
+
+# Get Help
+
+### On the web
+* [Puppet help messageboard](http://puppet.com/community/get-help)
+* [Writing tests](https://docs.puppet.com/guides/module_guides/bgtm.html#step-three-module-testing)
+* [General GitHub documentation](http://help.github.com/)
+* [GitHub pull request documentation](http://help.github.com/send-pull-requests/)
+
+### On chat
+* Slack (slack.puppet.com) #forge-modules, #puppet-dev, #windows, #voxpupuli
+* IRC (freenode) #puppet-dev, #voxpupuli
+
+
+[rspec-puppet]: http://rspec-puppet.com/
+[rspec-puppet_docs]: http://rspec-puppet.com/documentation/
+[beaker]: https://github.com/puppetlabs/beaker
+[beaker-rspec]: https://github.com/puppetlabs/beaker-rspec
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/Gemfile	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,73 @@
+source ENV['GEM_SOURCE'] || 'https://rubygems.org'
+
+def location_for(place_or_version, fake_version = nil)
+  git_url_regex = %r{\A(?<url>(https?|git)[:@][^#]*)(#(?<branch>.*))?}
+  file_url_regex = %r{\Afile:\/\/(?<path>.*)}
+
+  if place_or_version && (git_url = place_or_version.match(git_url_regex))
+    [fake_version, { git: git_url[:url], branch: git_url[:branch], require: false }].compact
+  elsif place_or_version && (file_url = place_or_version.match(file_url_regex))
+    ['>= 0', { path: File.expand_path(file_url[:path]), require: false }]
+  else
+    [place_or_version, { require: false }]
+  end
+end
+
+ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
+minor_version = ruby_version_segments[0..1].join('.')
+
+group :development do
+  gem "fast_gettext", '1.1.0',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.1.0')
+  gem "fast_gettext",                                            require: false if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.1.0')
+  gem "json_pure", '<= 2.0.1',                                   require: false if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0')
+  gem "json", '= 1.8.1',                                         require: false if Gem::Version.new(RUBY_VERSION.dup) == Gem::Version.new('2.1.9')
+  gem "json", '= 2.0.4',                                         require: false if Gem::Requirement.create('~> 2.4.2').satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
+  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))
+  gem "rb-readline", '= 0.5.5',                                  require: false, platforms: [:mswin, :mingw, :x64_mingw]
+  gem "puppet-module-posix-default-r#{minor_version}", '~> 0.3', require: false, platforms: [:ruby]
+  gem "puppet-module-posix-dev-r#{minor_version}", '~> 0.3',     require: false, platforms: [:ruby]
+  gem "puppet-module-win-default-r#{minor_version}", '~> 0.3',   require: false, platforms: [:mswin, :mingw, :x64_mingw]
+  gem "puppet-module-win-dev-r#{minor_version}", '~> 0.3',       require: false, platforms: [:mswin, :mingw, :x64_mingw]
+  gem "github_changelog_generator",                              require: false, git: 'https://github.com/skywinder/github-changelog-generator', ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018' if Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')
+end
+
+puppet_version = ENV['PUPPET_GEM_VERSION']
+facter_version = ENV['FACTER_GEM_VERSION']
+hiera_version = ENV['HIERA_GEM_VERSION']
+
+gems = {}
+
+gems['puppet'] = location_for(puppet_version)
+
+# If facter or hiera versions have been specified via the environment
+# variables
+
+gems['facter'] = location_for(facter_version) if facter_version
+gems['hiera'] = location_for(hiera_version) if hiera_version
+
+if Gem.win_platform? && puppet_version =~ %r{^(file:///|git://)}
+  # If we're using a Puppet gem on Windows which handles its own win32-xxx gem
+  # dependencies (>= 3.5.0), set the maximum versions (see PUP-6445).
+  gems['win32-dir'] =      ['<= 0.4.9', require: false]
+  gems['win32-eventlog'] = ['<= 0.6.5', require: false]
+  gems['win32-process'] =  ['<= 0.7.5', require: false]
+  gems['win32-security'] = ['<= 0.2.5', require: false]
+  gems['win32-service'] =  ['0.8.8', require: false]
+end
+
+gems.each do |gem_name, gem_params|
+  gem gem_name, *gem_params
+end
+
+# Evaluate Gemfile.local and ~/.gemfile if they exist
+extra_gemfiles = [
+  "#{__FILE__}.local",
+  File.join(Dir.home, '.gemfile'),
+]
+
+extra_gemfiles.each do |gemfile|
+  if File.file?(gemfile) && File.readable?(gemfile)
+    eval(File.read(gemfile), binding)
+  end
+end
+# vim: syntax=ruby
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/HISTORY.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,27 @@
+## 1.1.0
+### Summary
+A small addition release including a bump to the Puppet version requirements.
+
+#### Changed
+-  Updated the Puppet version to correctly reflect which version of Puppet includes the translation updates.
+
+#### Added
+- Adding acceptance test directory along with several nodesets for testing.
+- Addition of several files including maintainers, contributing and an update to existing Rakefiles and .travis files.
+
+## Supported Release [1.0.0]
+### Summary
+This is a feature release that includes support for interpolated strings.
+
+#### Added
+- support for passing strings that use interpolation to the `translate` function
+
+#### Removed
+- Debian 6 support
+
+## Supported Release [0.1.0]
+### Summary
+This is the initial release.
+
+[1.0.0]:https://github.com/puppetlabs/puppetlabs-translate/compare/0.1.0...1.0.0
+[0.1.0]:https://github.com/puppetlabs/puppetlabs-translate/commits/0.1.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/LICENSE	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/MAINTAINERS.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,6 @@
+## Maintenance
+
+Maintainers:
+  - Puppet Forge Modules Team `forge-modules |at| puppet |dot| com`
+
+Tickets: https://tickets.puppet.com/browse/MODULES. Make sure to set component to `translate`.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/NOTICE	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,15 @@
+Puppet Module - puppetlabs-translate
+
+Copyright 2017 Puppet, Inc.
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/README.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,38 @@
+# translate
+
+#### Table of Contents
+
+1. [Module Description - What the module does and why it is useful](#module-description)
+2. [Setup - The basics of getting started with translate](#setup)
+3. [Usage - Configuration options and additional functionality](#usage)
+4. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
+5. [Limitations - OS compatibility, etc.](#limitations)
+6. [Development - Guide for contributing to the module](#development)
+7. [Contributors](#contributors)
+
+## Module description
+
+This module provides the `translate` function for Puppet. Wrapping a string in this function will mark it to be picked up by gettext and put into the .pot file for translation purposes. Currently, we are **only marking failures, errors, and warnings** in Puppet Supported modules. Feel free to do what you like with your own. 
+
+## Setup
+
+Install this module with the Puppet Module Tool:
+```shell
+puppet module install puppetlabs-translate
+```
+
+## Reference
+
+For information on the classes and types, see the [REFERENCE.md](https://github.com/puppetlabs/puppetlabs-translate/blob/master/REFERENCE.md)
+
+## Limitations
+
+We do not yet support pluralization.
+
+## Development
+
+Puppet Labs modules on the Puppet Forge are open projects, and community contributions are essential for keeping them great. We can’t access the huge number of platforms and myriad hardware, software, and deployment configurations that Puppet is intended to serve. We want to keep it as easy as possible to contribute changes so that our modules work in your environment. There are a few guidelines that we need contributors to follow so that we can have a chance of keeping on top of things. For more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html)
+
+## Contributors
+
+The list of contributors can be found at: [https://github.com/puppetlabs/puppetlabs-translate/graphs/contributors](https://github.com/puppetlabs/puppetlabs-translate/graphs/contributors).
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/REFERENCE.md	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,70 @@
+# Reference
+<!-- DO NOT EDIT: This document was generated by Puppet Strings -->
+
+## Table of Contents
+
+**Functions**
+
+* [`translate`](#translate): A function that calls the _() function in gettext. This is because _ is protected in the puppet language
+
+## Functions
+
+### translate
+
+Type: Ruby 4.x API
+
+A function that calls the _() function in gettext. This is because _ is protected in the puppet language
+
+* **Note** Translate with simple strings:
+  - Takes in a string and passes it to fast_gettext's _() function. Primarily used for 'marking' a string to be added to a .pot file.
+Translate with interpolation:
+  - Takes in a string and a hash. Please note that variables in the message are wrapped with %{VAR} not ${VAR}.
+  - The hash contains key value pairs with marker and the variable it will be assigned to.
+  - The translate module passes it to fast_gettext's _() function. Primarily used for 'marking' a string to be added to a .pot file.
+
+#### Examples
+
+##### 
+
+```puppet
+fail(translate("Failure message"))
+```
+
+##### 
+
+```puppet
+fail(translate('message is %{color}'), {'color' => 'green'})
+```
+
+#### `translate(String $message, Optional[Hash] $interpolation_values)`
+
+The translate function.
+
+Returns: `String` translated message.
+
+##### Examples
+
+###### 
+
+```puppet
+fail(translate("Failure message"))
+```
+
+###### 
+
+```puppet
+fail(translate('message is %{color}'), {'color' => 'green'})
+```
+
+##### `message`
+
+Data type: `String`
+
+Message to translate
+
+##### `interpolation_values`
+
+Data type: `Optional[Hash]`
+
+Optional.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/Rakefile	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,86 @@
+require 'puppet_litmus/rake_tasks' if Bundler.rubygems.find_name('puppet_litmus').any?
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-syntax/tasks/puppet-syntax'
+require 'puppet_blacksmith/rake_tasks' if Bundler.rubygems.find_name('puppet-blacksmith').any?
+require 'github_changelog_generator/task' if Bundler.rubygems.find_name('github_changelog_generator').any?
+require 'puppet-strings/tasks' if Bundler.rubygems.find_name('puppet-strings').any?
+
+def changelog_user
+  return unless Rake.application.top_level_tasks.include? "changelog"
+  returnVal = nil || JSON.load(File.read('metadata.json'))['author']
+  raise "unable to find the changelog_user in .sync.yml, or the author in metadata.json" if returnVal.nil?
+  puts "GitHubChangelogGenerator user:#{returnVal}"
+  returnVal
+end
+
+def changelog_project
+  return unless Rake.application.top_level_tasks.include? "changelog"
+
+  returnVal = nil
+  returnVal ||= begin
+    metadata_source = JSON.load(File.read('metadata.json'))['source']
+    metadata_source_match = metadata_source && metadata_source.match(%r{.*\/([^\/]*?)(?:\.git)?\Z})
+
+    metadata_source_match && metadata_source_match[1]
+  end
+
+  raise "unable to find the changelog_project in .sync.yml or calculate it from the source in metadata.json" if returnVal.nil?
+
+  puts "GitHubChangelogGenerator project:#{returnVal}"
+  returnVal
+end
+
+def changelog_future_release
+  return unless Rake.application.top_level_tasks.include? "changelog"
+  returnVal = "v%s" % JSON.load(File.read('metadata.json'))['version']
+  raise "unable to find the future_release (version) in metadata.json" if returnVal.nil?
+  puts "GitHubChangelogGenerator future_release:#{returnVal}"
+  returnVal
+end
+
+PuppetLint.configuration.send('disable_relative')
+
+if Bundler.rubygems.find_name('github_changelog_generator').any?
+  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
+    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?
+    config.user = "#{changelog_user}"
+    config.project = "#{changelog_project}"
+    config.future_release = "#{changelog_future_release}"
+    config.exclude_labels = ['maintenance']
+    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)."
+    config.add_pr_wo_labels = true
+    config.issues = false
+    config.merge_prefix = "### UNCATEGORIZED PRS; GO LABEL THEM"
+    config.configure_sections = {
+      "Changed" => {
+        "prefix" => "### Changed",
+        "labels" => ["backwards-incompatible"],
+      },
+      "Added" => {
+        "prefix" => "### Added",
+        "labels" => ["feature", "enhancement"],
+      },
+      "Fixed" => {
+        "prefix" => "### Fixed",
+        "labels" => ["bugfix"],
+      },
+    }
+  end
+else
+  desc 'Generate a Changelog from GitHub'
+  task :changelog do
+    raise <<EOM
+The changelog tasks depends on unreleased features of the github_changelog_generator gem.
+Please manually add it to your .sync.yml for now, and run `pdk update`:
+---
+Gemfile:
+  optional:
+    ':development':
+      - gem: 'github_changelog_generator'
+        git: 'https://github.com/skywinder/github-changelog-generator'
+        ref: '20ee04ba1234e9e83eb2ffb5056e23d641c7a018'
+        condition: "Gem::Version.new(RUBY_VERSION.dup) >= Gem::Version.new('2.2.2')"
+EOM
+  end
+end
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/checksums.json	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,23 @@
+{
+  "CHANGELOG.md": "f6d40db0689a9cfd01db12fc8ae8935c",
+  "CONTRIBUTING.md": "4d17f3c942e7c93d1577cc4438a231e4",
+  "Gemfile": "1a5466fcfc1a2f40765b4abc5ea9ad06",
+  "HISTORY.md": "bc835a1a781369ba8c24681bdeab99f1",
+  "LICENSE": "3b83ef96387f14655fc854ddc3c6bd57",
+  "MAINTAINERS.md": "86bc26eb48e3994809990c1b49907550",
+  "NOTICE": "002a2b26ef50234b43afb62fa62a7b97",
+  "README.md": "09280f1b45c4250155d52a18aed02f37",
+  "REFERENCE.md": "57ac27e3762372254a0096f6fbf896e4",
+  "Rakefile": "35791ec85225c70e7b5a891f1bbd1b87",
+  "distelli-manifest.yml": "802c79b810412726002fee5029900c5f",
+  "lib/puppet/functions/translate.rb": "6b42a479316b1565dfe94760160e92b6",
+  "locales/config.yaml": "b291ec1700c36f3b902b5b135b841260",
+  "metadata.json": "7582e96d48c554e05bc604685f11d332",
+  "provision.yaml": "a2b212e922a952511bec76365230ee65",
+  "spec/acceptance/spec_helper_acceptance.rb": "9681de54bf44c9c507adc13d12bada2a",
+  "spec/acceptance/translate_spec.rb": "55bdb32fe0a766b66c27d4fcc6551897",
+  "spec/default_facts.yml": "973bd7e9b429cde3c8d45d57c2fa21ed",
+  "spec/functions/translate_spec.rb": "8f12d2a05773d09fea17a064f16b4cf9",
+  "spec/spec_helper.rb": "ec40d36ed109d8dba0df527c34c2c6db",
+  "spec/spec_helper_local.rb": "be320849409fd3a6ae2a21c04701d88a"
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/distelli-manifest.yml	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,25 @@
+team-modules/puppetlabs-translate:
+  PreBuild:
+    - source /opt/rh/rh-ruby25/enable
+    - echo "--- LETS update BUNDLER ---"
+    - bundle install --path vendor/bundle --jobs 3
+  Build:
+    - echo "--- PROVISIONING ---"
+    - source /opt/rh/rh-ruby25/enable
+    - bundle exec rake litmus:provision_list[release_checks]
+    - cat inventory.yaml
+    - echo "--- AGENT INSTALLATION ---"
+    - bundle exec rake litmus:install_agent
+    - echo "--- MODULE INSTALLATION ---"
+    - bundle exec rake litmus:install_module
+    - echo "--- TESTS RUNNING ---"
+    - bundle exec rake litmus:acceptance:parallel
+  AfterBuildSuccess:
+    - source /opt/rh/rh-ruby25/enable
+    - bundle exec rake litmus:tear_down
+  AfterBuildFailure:
+    - source /opt/rh/rh-ruby25/enable
+    - bundle exec rake litmus:tear_down
+  CommitData:
+    - RepoType: Git
+    - RepoPath: .
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/lib/puppet/functions/translate.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,34 @@
+# @summary A function that calls the _() function in gettext. This is because _ is protected in the puppet language
+#
+# @note
+#   Translate with simple strings:
+#     - Takes in a string and passes it to fast_gettext's _() function. Primarily used for 'marking' a string to be added to a .pot file.
+#   Translate with interpolation:
+#     - Takes in a string and a hash. Please note that variables in the message are wrapped with %{VAR} not ${VAR}.
+#     - The hash contains key value pairs with marker and the variable it will be assigned to.
+#     - The translate module passes it to fast_gettext's _() function. Primarily used for 'marking' a string to be added to a .pot file.
+#
+# @example
+#  fail(translate("Failure message"))
+# @example
+#  fail(translate('message is %{color}'), {'color' => 'green'})
+#
+Puppet::Functions.create_function(:translate) do
+  # @param message Message to translate
+  # @param interpolation_values Optional.
+  # @return [String] translated message.
+  dispatch :translate do
+    param 'String', :message
+    optional_param 'Hash', :interpolation_values
+  end
+
+  def translate(message, interpolation_values = nil)
+    if interpolation_values.nil?
+      _(message)
+    else
+      # convert keys to symbols
+      interpolation_values = Hash[interpolation_values.map { |k, v| [k.to_sym, v] }]
+      _(message) % interpolation_values
+    end
+  end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/locales/config.yaml	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,26 @@
+---
+# This is the project-specific configuration file for setting up
+# fast_gettext for your project.
+gettext:
+  # This is used for the name of the .pot and .po files; they will be
+  # called <project_name>.pot?
+  project_name: puppetlabs-translate
+  # This is used in comments in the .pot and .po files to indicate what
+  # project the files belong to and should bea little more desctiptive than
+  # <project_name>
+  package_name: puppetlabs-translate
+  # The locale that the default messages in the .pot file are in
+  default_locale: en
+  # The email used for sending bug reports.
+  bugs_address: docs@puppet.com
+  # The holder of the copyright.
+  copyright_holder: Puppet, Inc.
+  # This determines which comments in code should be eligible for translation.
+  # Any comments that start with this string will be externalized. (Leave
+  # empty to include all.)
+  comments_tag: TRANSLATOR
+  # Patterns for +Dir.glob+ used to find all files that might contain
+  # translatable content, relative to the project root directory
+  source_files:
+      - './lib/**/*.rb'
+  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/metadata.json	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,64 @@
+{
+  "name": "puppetlabs-translate",
+  "version": "2.1.0",
+  "author": "puppetlabs",
+  "summary": "Puppet module that provides the translate() function for internationalization.",
+  "license": "Apache-2.0",
+  "source": "https://github.com/puppetlabs/puppetlabs-translate",
+  "project_page": "https://github.com/puppetlabs/puppetlabs-translate",
+  "issues_url": "https://github.com/puppetlabs/puppetlabs-translate/issues",
+  "dependencies": [
+  
+  ],
+  "data_provider": null,
+  "operatingsystem_support": [
+    {
+      "operatingsystem": "Debian",
+      "operatingsystemrelease": [
+        "8",
+        "9",
+        "10"
+      ]
+    },
+    {
+      "operatingsystem": "RedHat",
+      "operatingsystemrelease": [
+        "5",
+        "6",
+        "7",
+        "8"
+      ]
+    },
+    {
+      "operatingsystem": "CentOS",
+      "operatingsystemrelease": [
+        "8"
+      ]
+    },
+    {
+      "operatingsystem": "Ubuntu",
+      "operatingsystemrelease": [
+        "14.04",
+        "16.04"
+      ]
+    },
+    {
+      "operatingsystem": "Windows",
+      "operatingsystemrelease": [
+        "2012",
+        "2016",
+        "2018",
+        "10"
+      ]
+    }
+  ],
+  "requirements": [
+    {
+      "name": "puppet",
+      "version_requirement": ">= 5.5.10 < 7.0.0"
+    }
+  ],
+  "pdk-version": "1.14.1",
+  "template-url": "https://github.com/puppetlabs/pdk-templates#master",
+  "template-ref": "tags/1.14.1-0-g0b5b39b"
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/provision.yaml	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,15 @@
+default:
+  provisioner: vmpooler
+  images: ['redhat-8-x86_64']
+travis_deb:
+  provisioner: docker
+  images: ['debian:8', 'debian:9', 'ubuntu:14.04', 'ubuntu:16.04', 'ubuntu:18.04']  
+travis_el:
+  provisioner: docker 
+  images: ['centos:6', 'centos:7', 'oraclelinux:6', 'oraclelinux:7', 'scientificlinux/sl:6', 'scientificlinux/sl:7']
+vagrant:
+  provisioner: vagrant
+  images: ['centos/7', 'generic/ubuntu1804', 'gusztavvargadr/windows-server']
+release_checks:
+  provisioner: vmpooler
+  images: ['debian-8-x86_64', 'debian-9-x86_64', 'debian-10-x86_64', 'ubuntu-1604-x86_64', 'redhat-5-x86_64', 'redhat-6-x86_64', 'redhat-7-x86_64', 'redhat-8-x86_64', 'centos-8-x86_64', 'sles-11-x86_64', 'sles-12-x86_64', 'win-2008r2-x86_64', 'win-2016-core-x86_64', 'win-2012r2-core-x86_64', 'win-10-ent-x86_64']
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/acceptance/spec_helper_acceptance.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,59 @@
+# frozen_string_literal: true
+
+require 'serverspec'
+require 'puppet_litmus'
+require 'spec_helper_acceptance_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_acceptance_local.rb'))
+include PuppetLitmus
+
+if ENV['TARGET_HOST'].nil? || ENV['TARGET_HOST'] == 'localhost'
+  puts 'Running tests against this machine !'
+  if Gem.win_platform?
+    set :backend, :cmd
+  else
+    set :backend, :exec
+  end
+else
+  # load inventory
+  inventory_hash = inventory_hash_from_inventory_file
+  node_config = config_from_node(inventory_hash, ENV['TARGET_HOST'])
+
+  if target_in_group(inventory_hash, ENV['TARGET_HOST'], 'docker_nodes')
+    host = ENV['TARGET_HOST']
+    set :backend, :docker
+    set :docker_container, host
+  elsif target_in_group(inventory_hash, ENV['TARGET_HOST'], 'ssh_nodes')
+    set :backend, :ssh
+    options = Net::SSH::Config.for(host)
+    options[:user] = node_config.dig('ssh', 'user') unless node_config.dig('ssh', 'user').nil?
+    options[:port] = node_config.dig('ssh', 'port') unless node_config.dig('ssh', 'port').nil?
+    options[:keys] = node_config.dig('ssh', 'private-key') unless node_config.dig('ssh', 'private-key').nil?
+    options[:password] = node_config.dig('ssh', 'password') unless node_config.dig('ssh', 'password').nil?
+    options[:verify_host_key] = Net::SSH::Verifiers::Null.new unless node_config.dig('ssh', 'host-key-check').nil?
+    host = if ENV['TARGET_HOST'].include?(':')
+             ENV['TARGET_HOST'].split(':').first
+           else
+             ENV['TARGET_HOST']
+           end
+    set :host,        options[:host_name] || host
+    set :ssh_options, options
+    set :request_pty, true
+  elsif target_in_group(inventory_hash, ENV['TARGET_HOST'], 'winrm_nodes')
+    require 'winrm'
+
+    set :backend, :winrm
+    set :os, family: 'windows'
+    user = node_config.dig('winrm', 'user') unless node_config.dig('winrm', 'user').nil?
+    pass = node_config.dig('winrm', 'password') unless node_config.dig('winrm', 'password').nil?
+    endpoint = "http://#{ENV['TARGET_HOST']}:5985/wsman"
+
+    opts = {
+      user: user,
+      password: pass,
+      endpoint: endpoint,
+      operation_timeout: 300,
+    }
+
+    winrm = WinRM::Connection.new opts
+    Specinfra.configuration.winrm = winrm
+  end
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/acceptance/translate_spec.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,3 @@
+describe 'an example' do
+  it 'is a pending example'
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/default_facts.yml	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,8 @@
+# Use default_module_facts.yml for module specific facts.
+#
+# Facts specified here will override the values provided by rspec-puppet-facts.
+---
+ipaddress: "172.16.254.254"
+ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
+is_pe: false
+macaddress: "AA:AA:AA:AA:AA:AA"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/functions/translate_spec.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,10 @@
+require 'spec_helper'
+
+describe 'translate' do
+  it { is_expected.not_to eq nil }
+  it { is_expected.to run.with_params('test string') }
+  it { is_expected.to run.with_params(123).and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('test string', 123).and_raise_error(ArgumentError) }
+  it { is_expected.to run.with_params('test %{interpolate_this}', 'interpolate_this' => 'ok').and_return('test ok') }
+  it { is_expected.to run.and_raise_error(ArgumentError) }
+end
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/spec_helper.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,59 @@
+RSpec.configure do |c|
+  c.mock_with :rspec
+end
+
+require 'puppetlabs_spec_helper/module_spec_helper'
+require 'rspec-puppet-facts'
+
+require 'spec_helper_local' if File.file?(File.join(File.dirname(__FILE__), 'spec_helper_local.rb'))
+
+include RspecPuppetFacts
+
+default_facts = {
+  puppetversion: Puppet.version,
+  facterversion: Facter.version,
+}
+
+default_fact_files = [
+  File.expand_path(File.join(File.dirname(__FILE__), 'default_facts.yml')),
+  File.expand_path(File.join(File.dirname(__FILE__), 'default_module_facts.yml')),
+]
+
+default_fact_files.each do |f|
+  next unless File.exist?(f) && File.readable?(f) && File.size?(f)
+
+  begin
+    default_facts.merge!(YAML.safe_load(File.read(f), [], [], true))
+  rescue => e
+    RSpec.configuration.reporter.message "WARNING: Unable to load #{f}: #{e}"
+  end
+end
+
+# read default_facts and merge them over what is provided by facterdb
+default_facts.each do |fact, value|
+  add_custom_fact fact, value
+end
+
+RSpec.configure do |c|
+  c.default_facts = default_facts
+  c.before :each do
+    # set to strictest setting for testing
+    # by default Puppet runs at warning level
+    Puppet.settings[:strict] = :warning
+  end
+  c.filter_run_excluding(bolt: true) unless ENV['GEM_BOLT']
+  c.after(:suite) do
+    RSpec::Puppet::Coverage.report!(0)
+  end
+end
+
+# Ensures that a module is defined
+# @param module_name Name of the module
+def ensure_module_defined(module_name)
+  module_name.split('::').reduce(Object) do |last_module, next_module|
+    last_module.const_set(next_module, Module.new) unless last_module.const_defined?(next_module, false)
+    last_module.const_get(next_module, false)
+  end
+end
+
+# 'spec_overrides' from sync.yml will appear below this line
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/modules/translate/spec/spec_helper_local.rb	Sat Dec 21 14:12:10 2019 -0500
@@ -0,0 +1,28 @@
+if ENV['COVERAGE'] == 'yes'
+  require 'simplecov'
+  require 'simplecov-console'
+  require 'codecov'
+
+  SimpleCov.formatters = [
+    SimpleCov::Formatter::HTMLFormatter,
+    SimpleCov::Formatter::Console,
+    SimpleCov::Formatter::Codecov,
+  ]
+  SimpleCov.start do
+    track_files 'lib/**/*.rb'
+
+    add_filter '/spec'
+
+    # do not track vendored files
+    add_filter '/vendor'
+    add_filter '/.vendor'
+
+    # do not track gitignored files
+    # this adds about 4 seconds to the coverage check
+    # this could definitely be optimized
+    add_filter do |f|
+      # system returns true if exit status is 0, which with git-check-ignore means file is ignored
+      system("git check-ignore --quiet #{f.filename}")
+    end
+  end
+end