Showing with 1,265 additions and 525 deletions.
  1. +0 −2 .fixtures.yml
  2. +5 −0 .gitattributes
  3. +2 −1 .gitignore
  4. +2 −0 .rspec
  5. +0 −7 .sync.yml
  6. +24 −13 .travis.yml
  7. +28 −0 CHANGELOG.md
  8. +3 −3 CONTRIBUTING.md
  9. +24 −33 Gemfile
  10. +3 −2 LICENSE
  11. +18 −0 NOTICE
  12. +162 −83 README.md
  13. +33 −1 Rakefile
  14. +31 −8 manifests/backend.pp
  15. +12 −8 manifests/balancermember.pp
  16. +13 −9 manifests/config.pp
  17. +42 −0 manifests/defaults.pp
  18. +39 −11 manifests/frontend.pp
  19. +15 −0 manifests/globals.pp
  20. +29 −29 manifests/init.pp
  21. +19 −17 manifests/instance.pp
  22. +20 −2 manifests/listen.pp
  23. +54 −0 manifests/mailer.pp
  24. +8 −0 manifests/mailer/collect_exported.pp
  25. +40 −0 manifests/mailers.pp
  26. +15 −12 manifests/params.pp
  27. +8 −9 manifests/peer.pp
  28. +2 −2 manifests/peers.pp
  29. +7 −0 manifests/service.pp
  30. +1 −1 manifests/userlist.pp
  31. +8 −7 metadata.json
  32. +28 −1 spec/acceptance/basic_spec.rb
  33. +126 −0 spec/acceptance/defaults_spec.rb
  34. +1 −1 spec/acceptance/frontbackend_spec.rb
  35. +1 −1 spec/acceptance/listen_spec.rb
  36. +0 −15 spec/acceptance/nodesets/centos-5-vcloud.yml
  37. +0 −10 spec/acceptance/nodesets/centos-59-x64.yml
  38. +0 −15 spec/acceptance/nodesets/centos-6-vcloud.yml
  39. +0 −12 spec/acceptance/nodesets/centos-64-x64-pe.yml
  40. +0 −10 spec/acceptance/nodesets/centos-64-x64.yml
  41. +0 −10 spec/acceptance/nodesets/centos-65-x64.yml
  42. +10 −0 spec/acceptance/nodesets/centos-7-x64.yml
  43. +0 −15 spec/acceptance/nodesets/debian-6-vcloud.yml
  44. +0 −15 spec/acceptance/nodesets/debian-7-vcloud.yml
  45. +10 −0 spec/acceptance/nodesets/debian-8-x64.yml
  46. +5 −5 spec/acceptance/nodesets/default.yml
  47. +12 −0 spec/acceptance/nodesets/docker/centos-7.yml
  48. +11 −0 spec/acceptance/nodesets/docker/debian-8.yml
  49. +12 −0 spec/acceptance/nodesets/docker/ubuntu-14.04.yml
  50. +0 −15 spec/acceptance/nodesets/redhat-7-vcloud.yml
  51. +0 −15 spec/acceptance/nodesets/ubuntu-1004-x86_64-vcloud.yml
  52. +0 −15 spec/acceptance/nodesets/ubuntu-1404-x86_64-vcloud.yml
  53. +0 −10 spec/acceptance/nodesets/ubuntu-server-10044-x64.yml
  54. +0 −10 spec/acceptance/nodesets/ubuntu-server-12042-x64.yml
  55. +0 −11 spec/acceptance/nodesets/ubuntu-server-1404-x64.yml
  56. +0 −11 spec/acceptance/unsupported_spec.rb
  57. +1 −1 spec/acceptance/userlist_spec.rb
  58. +33 −0 spec/defines/backend_spec.rb
  59. +17 −18 spec/defines/balancermember_spec.rb
  60. +32 −0 spec/defines/defaults_spec.rb
  61. +54 −0 spec/defines/frontend_spec.rb
  62. +3 −2 spec/defines/instance_service_spec.rb
  63. +8 −0 spec/defines/instance_spec.rb
  64. +80 −0 spec/defines/listen_spec.rb
  65. +34 −0 spec/defines/mailer_spec.rb
  66. +25 −0 spec/defines/mailers_spec.rb
  67. +0 −14 spec/defines/peer_spec.rb
  68. +20 −0 spec/defines/userlist_spec.rb
  69. +7 −0 spec/spec_helper.rb
  70. +21 −31 spec/spec_helper_acceptance.rb
  71. +37 −2 templates/fragments/_options.erb
  72. +1 −0 templates/haproxy_backend_block.erb
  73. +4 −0 templates/haproxy_defaults_block.erb
  74. +3 −0 templates/haproxy_mailer.erb
  75. +2 −0 templates/haproxy_mailers_block.erb
2 changes: 0 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ fixtures:
repositories:
concat:
repo: "git://github.com/puppetlabs/puppetlabs-concat.git"
ref: '1.2.3'
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: '3.2.0'
symlinks:
haproxy: "#{source_dir}"
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#This file is generated by ModuleSync, do not edit.
*.rb eol=lf
*.erb eol=lf
*.pp eol=lf
*.sh eol=lf
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#This file is generated by ModuleSync, do not edit.
pkg/
Gemfile.lock
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
log/
.idea/
*.iml
log/
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
--color
--format documentation
7 changes: 0 additions & 7 deletions .sync.yml

This file was deleted.

37 changes: 24 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,35 @@
#This file is generated by ModuleSync, do not edit.
---
sudo: false
language: ruby
bundler_args: --without system_tests
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
cache: bundler
script: "bundle exec rake validate lint spec"
matrix:
fast_finish: true
include:
- rvm: 1.8.7
- rvm: 2.1.6
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.1.6
dist: trusty
env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7
script: bundle exec rake beaker
services: docker
sudo: required
- rvm: 2.1.6
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 2.1.5
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.5
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
bundler_args: --without system_tests
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_GEM_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.6
env: PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- 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"
notifications:
email: false
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## Supported Release 1.5.0
### Summary

A substantial release with many new feature additions, including added Ubuntu Xenial support. Also includes several bugfixes, including the removal of unsupported platform testing restrictions to allow for easier testing on unsupported OSes.

#### Features
- Addition of mode to the backend class.
- Addition of Ubuntu 16.04 support.
- Addition of docs example on how to set up stick-tables.
- Updated to current modulesync configs.
- Basic usage now clarified in readme.
- Now uses concat 2.0.
- Addition of mailers.
- New option to use multiple defaults sections.
- Additional option to manage config_dir.
- Adds sysconfig_options param for /etc/sysconfig/haproxy.

#### Bugfixes
- No longer adds $ensure to balancermember concat fragments.
- Improved the ordering of options.
- Correct class now used for sort_options_alphabetic.
- Netcat has now been replaced with socat.
- Tests adjusted to work under strict_variables.
- Config file now validated before added.
- Removal of unsupported platforms restrictions in testing.
- Removal of the default-server keyword from test.
- Now uses haproxy::config_file instead of deafult config_file.

## Supported Release 1.4.0
###Summary

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ If you already have those gems installed, make sure they are up-to-date:
With all dependencies in place and up-to-date we can now run the tests:

```shell
% rake spec
% bundle exec rake spec
```

This will execute all the [rspec tests](http://rspec-puppet.com/) tests
Expand All @@ -178,8 +178,8 @@ installed on your system.
You can run them by issuing the following command

```shell
% rake spec_clean
% rspec spec/acceptance
% 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),
Expand Down
57 changes: 24 additions & 33 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,48 +1,39 @@
#This file is generated by ModuleSync, do not edit.

source ENV['GEM_SOURCE'] || "https://rubygems.org"

def location_for(place, fake_version = nil)
if place =~ /^(git:[^#]*)#(.*)/
[fake_version, { :git => $1, :branch => $2, :require => false }].compact
def location_for(place, version = nil)
if place =~ /^(git[:@][^#]*)#(.*)/
[version, { :git => $1, :branch => $2, :require => false}].compact
elsif place =~ /^file:\/\/(.*)/
['>= 0', { :path => File.expand_path($1), :require => false }]
['>= 0', { :path => File.expand_path($1), :require => false}]
else
[place, { :require => false }]
[place, version, { :require => false}].compact
end
end

group :development, :unit_tests do
gem 'rspec-core', '3.1.7', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
gem 'json', :require => false
gem 'metadata-json-lint', :require => false
gem 'puppet_facts', :require => false
gem 'puppet-blacksmith', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'rspec-puppet', '>= 2.3.2', :require => false
gem 'simplecov', :require => false
end

group :system_tests do
if beaker_version = ENV['BEAKER_VERSION']
gem 'beaker', *location_for(beaker_version)
end
if beaker_rspec_version = ENV['BEAKER_RSPEC_VERSION']
gem 'beaker-rspec', *location_for(beaker_rspec_version)
else
gem 'beaker-rspec', :require => false
end
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'beaker-rspec', *location_for(ENV['BEAKER_RSPEC_VERSION'] || '>= 3.4')
gem 'beaker', *location_for(ENV['BEAKER_VERSION'])
gem 'serverspec', :require => false
gem 'beaker-puppet_install_helper', :require => false
gem 'master_manipulator', :require => false
gem 'beaker-hostgenerator', *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'])
end

gem 'facter', *location_for(ENV['FACTER_GEM_VERSION'])
gem 'puppet', *location_for(ENV['PUPPET_GEM_VERSION'])


if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
if File.exists? "#{__FILE__}.local"
eval(File.read("#{__FILE__}.local"), binding)
end

# vim:ft=ruby
5 changes: 3 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -180,13 +181,13 @@
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
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 2012 Puppet Labs
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.
Expand Down
18 changes: 18 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
haproxy puppet module

Copyright 2012 Puppet Labs-2016 Puppet Labs, Inc.

Puppet Labs can be contacted at: info@puppetlabs.com


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