3 changes: 3 additions & 0 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@ fixtures:
repo: "git://github.com/puppetlabs/puppetlabs-concat.git"
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
facts: 'git://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'git://github.com/puppetlabs/puppetlabs-puppet_agent.git'
provision: 'git://github.com/puppetlabs/provision.git'
symlinks:
haproxy: "#{source_dir}"
8 changes: 6 additions & 2 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
require: rubocop-rspec
require:
- rubocop-rspec
- rubocop-i18n
AllCops:
DisplayCopNames: true
TargetRubyVersion: '2.1'
Expand All @@ -19,10 +21,12 @@ AllCops:
Metrics/LineLength:
Description: People have wide screens, use them.
Max: 200
GetText:
Enabled: false
GetText/DecorateString:
Description: We don't want to decorate test output.
Exclude:
- spec/*
- spec/**/*
RSpec/BeforeAfterAll:
Description: Beware of using after(:all) as it may cause state to leak between tests.
A necessary evil in acceptance testing.
Expand Down
36 changes: 17 additions & 19 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
required:
- ---.project

.gitlab-ci.yml:
unmanaged: true

.travis.yml:
docker_sets:
- set: docker/centos-7
Expand All @@ -13,32 +16,27 @@
branches:
- release

.rubocop.yml:
default_configs:
inherit_from: .rubocop_todo.yml
require:
- rubocop-i18n
- rubocop-rspec

appveyor.yml:
delete: true

Gemfile:
required:
':system_tests':
- gem: 'puppet-module-posix-system-r#{minor_version}'
platforms: ruby
- gem: 'puppet-module-win-system-r#{minor_version}'
platforms:
- mswin
- mingw
- x64_mingw
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')"

appveyor.yml:
delete: true

.rubocop.yml:
default_configs:
inherit_from: .rubocop_todo.yml

.gitlab-ci.yml:
unmanaged: true

Rakefile:
changelog_user: puppetlabs

spec/spec_helper.rb:
mock_with: ':rspec'
coverage_report: true
66 changes: 47 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
---
dist: xenial
language: ruby
cache: bundler
before_install:
Expand All @@ -23,22 +24,58 @@ matrix:
fast_finish: true
include:
-
bundler_args:
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/centos-7 BEAKER_TESTMODE=apply
rvm: 2.5.3
script: bundle exec rake beaker
env: PLATFORMS=deb_puppet5
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[travis_deb]'
- bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='*'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
stage: acceptance
sudo: required
-
bundler_args:
bundler_args:
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_set=docker/ubuntu-14.04 BEAKER_TESTMODE=apply
rvm: 2.5.3
script: bundle exec rake beaker
env: PLATFORMS=deb_puppet6
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[travis_deb]'
- bundle exec bolt command run 'apt-get install wget -y' --inventoryfile inventory.yaml --nodes='*'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet5
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[travis_el]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet6
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[travis_el]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
stage: acceptance
sudo: required
-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
Expand All @@ -61,12 +98,3 @@ branches:
- release
notifications:
email: false
deploy:
provider: puppetforge
user: puppet
password:
secure: ""
on:
tags: true
all_branches: true
condition: "$DEPLOY_TO_FORGE = yes"
6 changes: 6 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"recommendations": [
"jpogran.puppet-vscode",
"rebornix.Ruby"
]
}
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,21 @@

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).

## [v4.1.0](https://github.com/puppetlabs/puppetlabs-haproxy/tree/v4.1.0) (2019-09-26)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-haproxy/compare/v4.0.0...v4.1.0)

### Added

- pdksync - Add support on Debian10 [\#380](https://github.com/puppetlabs/puppetlabs-haproxy/pull/380) ([lionce](https://github.com/lionce))
- FM-8140 Add redhat8 support [\#374](https://github.com/puppetlabs/puppetlabs-haproxy/pull/374) ([sheenaajay](https://github.com/sheenaajay))
- \(FM-8220\) convert to use litmus [\#373](https://github.com/puppetlabs/puppetlabs-haproxy/pull/373) ([tphoney](https://github.com/tphoney))

### Fixed

- MODULES-9783 - Removed option tcplog [\#376](https://github.com/puppetlabs/puppetlabs-haproxy/pull/376) ([uberjew666](https://github.com/uberjew666))
- Add check of OS for the systemd unitfile [\#347](https://github.com/puppetlabs/puppetlabs-haproxy/pull/347) ([surprisingb](https://github.com/surprisingb))

## [v4.0.0](https://github.com/puppetlabs/puppetlabs-haproxy/tree/v4.0.0) (2019-05-16)

[Full Changelog](https://github.com/puppetlabs/puppetlabs-haproxy/compare/3.0.1...v4.0.0)
Expand Down
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Setting ownership to the modules team
* @puppetlabs/modules
28 changes: 12 additions & 16 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,19 @@ end

ruby_version_segments = Gem::Version.new(RUBY_VERSION.dup).segments
minor_version = ruby_version_segments[0..1].join('.')

gem 'rb-readline'
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 "puppet-module-posix-default-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-posix-dev-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-default-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
gem "puppet-module-win-dev-r#{minor_version}", 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
group :system_tests do
gem "puppet-module-posix-system-r#{minor_version}", require: false, platforms: [:ruby]
gem "puppet-module-win-system-r#{minor_version}", require: false, platforms: [:mswin, :mingw, :x64_mingw]
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 "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']
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,6 @@ For an extensive list of supported operating systems, see [metadata.json](https:
## 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://docs.puppetlabs.com/forge/contributing.html)
For more information, see our [module contribution guide.](https://puppet.com/docs/puppet/latest/contributing.html)

To see who's already involved, see the [list of contributors.](https://github.com/puppetlabs/puppetlabs-haproxy/graphs/contributors)
3 changes: 0 additions & 3 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,6 @@ Data type: `Any`
A hash of options that are inserted into the backend configuration block.

Default value: {
'option' => [
'tcplog',
],
'balance' => 'roundrobin',
}

Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
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?
Expand All @@ -14,7 +15,7 @@ end

def changelog_project
return unless Rake.application.top_level_tasks.include? "changelog"
returnVal = nil || JSON.load(File.read('metadata.json'))['name']
returnVal = nil || JSON.load(File.read('metadata.json'))['source'].match(%r{.*/([^/]*)})[1]
raise "unable to find the changelog_project in .sync.yml or the name in metadata.json" if returnVal.nil?
puts "GitHubChangelogGenerator project:#{returnVal}"
returnVal
Expand Down
25 changes: 25 additions & 0 deletions distelli-manifest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
team-modules/puppetlabs-haproxy:
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: .
3 changes: 0 additions & 3 deletions manifests/backend.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@
$mode = undef,
$collect_exported = true,
$options = {
'option' => [
'tcplog',
],
'balance' => 'roundrobin',
},
$instance = 'haproxy',
Expand Down
7 changes: 6 additions & 1 deletion manifests/instance_service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@
$wrapper = "/opt/${haproxy_package}/sbin/haproxy-systemd-wrapper"
}

$unitfile = "/usr/lib/systemd/system/haproxy-${title}.service"
if $::osfamily == 'RedHat' {
$unitfile = "/usr/lib/systemd/system/haproxy-${title}.service"
} else {
$unitfile = "/lib/systemd/system/haproxy-${title}.service"
}

file { $unitfile:
ensure => file,
mode => '0644',
Expand Down
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
$sysconfig_options = 'OPTIONS=""' #Only used by Redhat/CentOS etc

case $::osfamily {
'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse' : {
'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse', 'Linux' : {
$package_name = 'haproxy'
$service_name = 'haproxy'
$global_options = {
Expand Down
15 changes: 9 additions & 6 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "puppetlabs-haproxy",
"version": "4.0.0",
"version": "4.1.0",
"author": "puppetlabs",
"summary": "Configures HAProxy servers and manages the configuration of backend member servers.",
"license": "Apache-2.0",
Expand All @@ -22,7 +22,9 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"7"
"6",
"7",
"8"
]
},
{
Expand Down Expand Up @@ -52,7 +54,8 @@
"operatingsystem": "Debian",
"operatingsystemrelease": [
"8",
"9"
"9",
"10"
]
},
{
Expand All @@ -70,7 +73,7 @@
"version_requirement": ">= 5.5.10 < 7.0.0"
}
],
"template-url": "https://github.com/puppetlabs/pdk-templates#master",
"template-ref": "heads/master-0-gf778803",
"pdk-version": "1.10.0"
"template-url": "https://github.com/puppetlabs/pdk-templates/#master",
"template-ref": "heads/master-0-gb096033",
"pdk-version": "1.11.1"
}
13 changes: 13 additions & 0 deletions provision.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
default:
provisioner: docker
images: ['waffleimage/debian8']
travis_deb:
provisioner: docker
images: ['waffleimage/debian8', 'waffleimage/debian9', 'waffleimage/ubuntu14.04', 'waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04']
travis_el:
provisioner: docker_exp
images: ['waffleimage/centos7', 'waffleimage/oraclelinux7', 'waffleimage/scientificlinux7']
release_checks:
provisioner: vmpooler
images: ['redhat-5-x86_64', 'redhat-7-x86_64', 'centos-5-x86_64', 'centos-6-x86_64', 'centos-7-x86_64', 'oracle-5-x86_64', 'oracle-6-x86_64', 'scientific-6-x86_64', 'scientific-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'debian-10-x86_64', 'ubuntu-1404-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64' ]
Loading