Skip to content

Commit

Permalink
Merge pull request #27 from mwhahaha/prep-0.2.0
Browse files Browse the repository at this point in the history
Update to 0.2.0
  • Loading branch information
mwhahaha authored Sep 4, 2020
2 parents e714cfb + 21db4ce commit d8f8aed
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 229 deletions.
9 changes: 0 additions & 9 deletions .gemfiles/Gemfile.rspec

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pkg
spec/fixtures/modules
Gemfile.lock
44 changes: 10 additions & 34 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,20 @@
language: ruby
rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.1
- 2.5.3
- 2.5.7

before_install: rm .gemfiles/Gemfile.rspec.lock || true
gemfile: .gemfiles/Gemfile.rspec
before_install: rm Gemfile.lock || true
gemfile: Gemfile

script:
- "bundle exec rake lint"
- "bundle exec rake syntax"
- "bundle exec rake spec SPEC_OPTS='--format documentation'"

env:
- PUPPET_VERSION="~> 2.7.0"
- PUPPET_VERSION="~> 3.1.0"
- PUPPET_VERSION="~> 3.2.0"
- PUPPET_VERSION="~> 3.3.0"
- PUPPET_VERSION="~> 3.4.0"
- PUPPET_VERSION="~> 3.5.0"
- PUPPET_VERSION="~> 3.6.0"
- PUPPET_VERSION="~> 3.7.0"
matrix:
exclude:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 3.1.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 2.7.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.0.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.1.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.2.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.3.0"
- rvm: 2.1.1
env: PUPPET_VERSION="~> 3.4.0"
- PUPPET_VERSION="~> 5.5.0"
- PUPPET_VERSION="~> 6.17.0"
#matrix:
# exclude:
# - rvm: 2.5.3
# env: PUPPET_VERSION="~> 6.17.0"
22 changes: 22 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
source ENV['GEM_SOURCE'] || "https://rubygems.org"

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
end

gem 'metadata-json-lint'
gem 'puppetlabs_spec_helper'
gem 'rake'
gem 'rspec-puppet'
gem 'rspec-puppet-facts'
gem 'rspec-puppet-utils'

# vim:ft=ruby
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
# TODO(mwhahaha): remove this after deprecation period
PuppetLint.configuration.send('disable_variable_is_lowercase')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

desc "Validate manifests, templates, and ruby files"
Expand Down
17 changes: 14 additions & 3 deletions manifests/config/watchdog.pp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# String. The auth key to use for the watchdog.
# Defaults to <tt></tt>.
#
# [*delegate_IP*]
# [*delegate_ip*]
# String. The virtual IP for pgpool.
# Defaults to <tt></tt>.
#
Expand Down Expand Up @@ -125,6 +125,12 @@
# String. The directory where the UNIX domain socket accepting pgpool-II watchdog IPC connections will be created.
# Defaults to <tt>/tmp</tt>.
#
# === DEPECATED
#
# [*delegate_IP*]
# String. The virtual IP for pgpool.
# Defaults to <tt></tt>.
#
# === Variables
#
# N/A
Expand All @@ -144,7 +150,7 @@
$wd_hostname = '',
$wd_port = 9000,
$wd_authkey = '',
$delegate_IP = '',
$delegate_ip = '',
$ifconfig_path = '/sbin',
$if_up_cmd = 'ifconfig eth0:0 inet $_IP_$ netmask 255.255.255.0',
$if_down_cmd = 'ifconfig eth0:0 down',
Expand All @@ -167,16 +173,21 @@
$wd_monitoring_interfaces_list = '',
$wd_priority = 1,
$wd_ipc_socket_dir = '/tmp',
# deprecated
$delegate_IP = undef,
) {

if $delegate_IP {
warning('DEPRECATED: $delegate_IP has been replaced by $delegate_ip and will be removed in a future version')
}
$watchdog_config = {
'use_watchdog' => { value => $use_watchdog },
'trusted_servers' => { value => $trusted_servers },
'ping_path' => { value => $ping_path },
'wd_hostname' => { value => $wd_hostname },
'wd_port' => { value => $wd_port },
'wd_authkey' => { value => $wd_authkey },
'delegate_IP' => { value => $delegate_IP },
'delegate_IP' => { value => pick($delegate_IP, $delegate_ip) },
'ifconfig_path' => { value => $ifconfig_path },
'if_up_cmd' => { value => $if_up_cmd },
'if_down_cmd' => { value => $if_down_cmd },
Expand Down
16 changes: 8 additions & 8 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@
class { 'pgpool::config': }

if ($ensure == absent) {
Anchor['pgpool::begin'] ->
Class['pgpool::service'] ->
Class['pgpool::config'] ->
Class['pgpool::package']
Anchor['pgpool::begin']
-> Class['pgpool::service']
-> Class['pgpool::config']
-> Class['pgpool::package']
} else {
Anchor['pgpool::begin'] ->
Class['pgpool::package'] ->
Class['pgpool::config'] ->
Class['pgpool::service']
Anchor['pgpool::begin']
-> Class['pgpool::package']
-> Class['pgpool::config']
-> Class['pgpool::service']

}
}
28 changes: 13 additions & 15 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mwhahaha-pgpool",
"version": "0.1.14",
"version": "0.2.0",
"author": "mwhahaha",
"summary": "A puppet module to configure pgpool",
"license": "Apache-2.0",
Expand All @@ -10,7 +10,7 @@
"tags": [ "pgpool", "database", "postgresql" ],
"dependencies": [
{
"version_range": ">= 1.0.0 < 5.0.0",
"version_range": ">= 1.0.0 < 6.5.0",
"name": "puppetlabs-stdlib"
},
{
Expand All @@ -35,35 +35,33 @@
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"5",
"6"
"6",
"7",
"8"
]
},
{
"operatingsystem": "CentOS",
"operatingsystemrelease": [
"5",
"6"
"6",
"7",
"8"
]
},
{
"operatingsystem": "OracleLinux",
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [
"5",
"6"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"5",
"6"
"16.04",
"18.04",
"20.04"
]
}
],
"requirements": [
{
"name": "puppet",
"version_requirement": ">=2.7.0 <4.0.0"
"version_requirement": ">=2.7.0 <7.0.0"
}
]
}
Expand Down
Loading

0 comments on commit d8f8aed

Please sign in to comment.