mirror of
https://github.com/krislamo/puppet-rsnapshot
synced 2024-11-10 00:00:35 +00:00
fix random number generator so that minute, hour... actually have different random numbers, not the same
This commit is contained in:
parent
569f38f606
commit
c55ec365cc
56
Gemfile
56
Gemfile
@ -1,34 +1,32 @@
|
||||
source "https://rubygems.org"
|
||||
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||
|
||||
group :test do
|
||||
gem "rake"
|
||||
gem "puppet", ENV['PUPPET_GEM_VERSION'] || '~> 3.8.0'
|
||||
gem "rspec", '< 3.2.0'
|
||||
gem "rspec-puppet", :git => 'https://github.com/rodjek/rspec-puppet.git'
|
||||
gem "puppetlabs_spec_helper"
|
||||
gem "metadata-json-lint"
|
||||
gem "rspec-puppet-facts"
|
||||
gem 'rubocop', '0.33.0'
|
||||
gem 'simplecov', '>= 0.11.0'
|
||||
gem 'simplecov-console'
|
||||
|
||||
gem "puppet-lint-absolute_classname-check"
|
||||
gem "puppet-lint-leading_zero-check"
|
||||
gem "puppet-lint-trailing_comma-check"
|
||||
gem "puppet-lint-version_comparison-check"
|
||||
gem "puppet-lint-classes_and_types_beginning_with_digits-check"
|
||||
gem "puppet-lint-unquoted_string-check"
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem "travis"
|
||||
gem "travis-lint"
|
||||
gem "puppet-blacksmith"
|
||||
gem "guard-rake"
|
||||
group :development, :unit_tests do
|
||||
gem 'rspec-core', '~> 3.1.7', :require => false
|
||||
gem 'rspec-puppet', '~> 2.1', :require => false
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
gem 'simplecov', :require => false
|
||||
gem 'puppet_facts', :require => false
|
||||
gem 'json', :require => false
|
||||
gem 'metadata-json-lint', :require => false
|
||||
gem 'puppet-lint', '< 1.1.0', :require => false
|
||||
end
|
||||
|
||||
group :system_tests do
|
||||
gem "beaker"
|
||||
gem "beaker-rspec"
|
||||
gem "beaker-puppet_install_helper"
|
||||
gem 'beaker-rspec', :require => false
|
||||
gem 'serverspec', :require => false
|
||||
gem 'beaker-puppet_install_helper', :require => false
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
# vim:ft=ruby
|
||||
|
167
Gemfile.lock
167
Gemfile.lock
@ -1,14 +1,7 @@
|
||||
GIT
|
||||
remote: https://github.com/rodjek/rspec-puppet.git
|
||||
revision: 8c1913b2697ee4a60db65607967fbb73226c8bd6
|
||||
specs:
|
||||
rspec-puppet (2.3.0)
|
||||
rspec
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.2.8)
|
||||
CFPropertyList (2.3.2)
|
||||
activesupport (4.2.5)
|
||||
i18n (~> 0.7)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
@ -16,9 +9,6 @@ GEM
|
||||
thread_safe (~> 0.3, >= 0.3.4)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.4.0)
|
||||
ast (2.2.0)
|
||||
astrolabe (1.3.1)
|
||||
parser (~> 2.2)
|
||||
autoparse (0.3.3)
|
||||
addressable (>= 2.3.1)
|
||||
extlib (>= 0.9.15)
|
||||
@ -28,7 +18,6 @@ GEM
|
||||
aws-sdk-v1 (1.66.0)
|
||||
json (~> 1.4)
|
||||
nokogiri (>= 1.4.4)
|
||||
backports (3.6.7)
|
||||
beaker (2.31.0)
|
||||
aws-sdk (~> 1.57)
|
||||
beaker-answers (~> 0.0)
|
||||
@ -63,30 +52,16 @@ GEM
|
||||
serverspec (~> 2)
|
||||
specinfra (~> 2)
|
||||
builder (3.2.2)
|
||||
coderay (1.1.0)
|
||||
colorize (0.7.7)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.5)
|
||||
docker-api (1.24.1)
|
||||
excon (>= 0.38.0)
|
||||
json
|
||||
domain_name (0.5.25)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
ethon (0.8.0)
|
||||
ffi (>= 1.3.0)
|
||||
excon (0.45.4)
|
||||
extlib (0.9.16)
|
||||
facter (2.4.4)
|
||||
CFPropertyList (~> 2.2.6)
|
||||
facterdb (0.3.0)
|
||||
facter
|
||||
jgrep
|
||||
json
|
||||
facter (1.7.6)
|
||||
faraday (0.9.2)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday_middleware (0.10.0)
|
||||
faraday (>= 0.7.4, < 0.10)
|
||||
ffi (1.9.10)
|
||||
fission (0.5.0)
|
||||
CFPropertyList (~> 2.2)
|
||||
fog (1.34.0)
|
||||
@ -186,13 +161,6 @@ GEM
|
||||
fog-core
|
||||
nokogiri (~> 1.5, >= 1.5.11)
|
||||
formatador (0.2.5)
|
||||
gh (0.14.0)
|
||||
addressable
|
||||
backports
|
||||
faraday (~> 0.8)
|
||||
multi_json (~> 1.0)
|
||||
net-http-persistent (>= 2.7)
|
||||
net-http-pipeline
|
||||
google-api-client (0.8.6)
|
||||
activesupport (>= 3.2)
|
||||
addressable (~> 2.3)
|
||||
@ -211,50 +179,27 @@ GEM
|
||||
memoist (~> 0.12)
|
||||
multi_json (~> 1.11)
|
||||
signet (~> 0.7)
|
||||
guard (2.13.0)
|
||||
formatador (>= 0.2.4)
|
||||
listen (>= 2.7, <= 4.0)
|
||||
lumberjack (~> 1.0)
|
||||
nenv (~> 0.1)
|
||||
notiffany (~> 0.0)
|
||||
pry (>= 0.9.12)
|
||||
shellany (~> 0.0)
|
||||
thor (>= 0.18.1)
|
||||
guard-rake (1.0.0)
|
||||
guard
|
||||
rake
|
||||
hiera (1.3.4)
|
||||
json_pure
|
||||
highline (1.7.8)
|
||||
hirb (0.7.3)
|
||||
hocon (0.9.3)
|
||||
http-cookie (1.0.2)
|
||||
domain_name (~> 0.5)
|
||||
i18n (0.7.0)
|
||||
inflecto (0.0.2)
|
||||
inifile (2.0.2)
|
||||
ipaddress (0.8.0)
|
||||
jgrep (1.4.0)
|
||||
json
|
||||
json (1.8.3)
|
||||
json_pure (1.8.3)
|
||||
jwt (1.5.2)
|
||||
launchy (2.4.3)
|
||||
addressable (~> 2.3)
|
||||
listen (3.0.5)
|
||||
rb-fsevent (>= 0.9.3)
|
||||
rb-inotify (>= 0.9)
|
||||
little-plugger (1.1.4)
|
||||
logging (2.0.0)
|
||||
little-plugger (~> 1.1)
|
||||
multi_json (~> 1.10)
|
||||
lumberjack (1.0.9)
|
||||
memoist (0.14.0)
|
||||
metaclass (0.0.4)
|
||||
metadata-json-lint (0.0.11)
|
||||
json
|
||||
spdx-licenses (~> 1.0)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.99)
|
||||
mini_portile2 (2.0.0)
|
||||
minitest (5.8.3)
|
||||
@ -262,72 +207,33 @@ GEM
|
||||
metaclass (~> 0.0.1)
|
||||
multi_json (1.11.2)
|
||||
multipart-post (2.0.0)
|
||||
nenv (0.2.0)
|
||||
net-http-persistent (2.9.4)
|
||||
net-http-pipeline (1.0.1)
|
||||
net-scp (1.2.1)
|
||||
net-ssh (>= 2.6.5)
|
||||
net-ssh (2.9.2)
|
||||
net-telnet (0.1.1)
|
||||
netrc (0.11.0)
|
||||
nokogiri (1.6.7.1)
|
||||
mini_portile2 (~> 2.0.0.rc2)
|
||||
notiffany (0.0.8)
|
||||
nenv (~> 0.1)
|
||||
shellany (~> 0.0)
|
||||
open_uri_redirections (0.2.1)
|
||||
parser (2.2.3.0)
|
||||
ast (>= 1.1, < 3.0)
|
||||
powerpack (0.1.1)
|
||||
pry (0.9.12.6)
|
||||
coderay (~> 1.0)
|
||||
method_source (~> 0.8)
|
||||
slop (~> 3.4)
|
||||
puppet (3.8.4)
|
||||
facter (> 1.6, < 3)
|
||||
hiera (~> 1.0)
|
||||
json_pure
|
||||
puppet-blacksmith (3.3.1)
|
||||
puppet (>= 2.7.16)
|
||||
rest-client
|
||||
puppet-lint (1.1.0)
|
||||
puppet-lint-absolute_classname-check (0.1.3)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint-classes_and_types_beginning_with_digits-check (0.1.0)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint-leading_zero-check (0.1.0)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint-trailing_comma-check (0.3.1)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint-unquoted_string-check (0.2.5)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint-version_comparison-check (0.1.2)
|
||||
puppet-lint (~> 1.0)
|
||||
puppet-lint (1.0.1)
|
||||
puppet-syntax (2.0.0)
|
||||
rake
|
||||
puppet_facts (0.2.1)
|
||||
puppetlabs_spec_helper (1.0.1)
|
||||
mocha
|
||||
puppet-lint
|
||||
puppet-syntax
|
||||
rake
|
||||
rspec-puppet
|
||||
pusher-client (0.6.2)
|
||||
json
|
||||
websocket (~> 1.0)
|
||||
rainbow (2.0.0)
|
||||
rake (10.4.2)
|
||||
rb-fsevent (0.9.6)
|
||||
rb-inotify (0.9.5)
|
||||
ffi (>= 0.5.0)
|
||||
rbvmomi (1.8.2)
|
||||
builder
|
||||
nokogiri (>= 1.4.1)
|
||||
trollop
|
||||
require_all (1.3.3)
|
||||
rest-client (1.8.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 3.0)
|
||||
netrc (~> 0.7)
|
||||
retriable (1.4.1)
|
||||
rspec (3.1.0)
|
||||
rspec-core (~> 3.1.0)
|
||||
@ -343,27 +249,16 @@ GEM
|
||||
rspec-expectations (>= 3.0.0)
|
||||
rspec-mocks (3.1.3)
|
||||
rspec-support (~> 3.1.0)
|
||||
rspec-puppet-facts (1.3.0)
|
||||
facter
|
||||
facterdb (>= 0.3.0)
|
||||
json
|
||||
puppet
|
||||
rspec-puppet (2.3.0)
|
||||
rspec
|
||||
rspec-support (3.1.2)
|
||||
rsync (1.0.9)
|
||||
rubocop (0.33.0)
|
||||
astrolabe (~> 1.3)
|
||||
parser (>= 2.2.2.5, < 3.0)
|
||||
powerpack (~> 0.1)
|
||||
rainbow (>= 1.99.1, < 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
ruby-progressbar (1.7.5)
|
||||
serverspec (2.25.0)
|
||||
multi_json
|
||||
rspec (~> 3.0)
|
||||
rspec-its
|
||||
specinfra (~> 2.46)
|
||||
sfl (2.2)
|
||||
shellany (0.0.1)
|
||||
signet (0.7.2)
|
||||
addressable (~> 2.3)
|
||||
faraday (~> 0.9)
|
||||
@ -373,12 +268,7 @@ GEM
|
||||
docile (~> 1.1.0)
|
||||
json (~> 1.8)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-console (0.2.0)
|
||||
colorize
|
||||
hirb
|
||||
simplecov
|
||||
simplecov-html (0.10.0)
|
||||
slop (3.6.0)
|
||||
spdx-licenses (1.0.0)
|
||||
json
|
||||
specinfra (2.47.0)
|
||||
@ -387,55 +277,28 @@ GEM
|
||||
net-telnet
|
||||
sfl
|
||||
stringify-hash (0.0.2)
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.5)
|
||||
travis (1.8.0)
|
||||
addressable (~> 2.3)
|
||||
backports
|
||||
faraday (~> 0.9)
|
||||
faraday_middleware (~> 0.9, >= 0.9.1)
|
||||
gh (~> 0.13)
|
||||
highline (~> 1.6)
|
||||
launchy (~> 2.1)
|
||||
pry (~> 0.9, < 0.10)
|
||||
pusher-client (~> 0.4)
|
||||
typhoeus (~> 0.6, >= 0.6.8)
|
||||
travis-lint (2.0.0)
|
||||
json
|
||||
trollop (2.1.2)
|
||||
typhoeus (0.8.0)
|
||||
ethon (>= 0.8.0)
|
||||
tzinfo (1.2.2)
|
||||
thread_safe (~> 0.1)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.1)
|
||||
websocket (1.2.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
beaker
|
||||
beaker-puppet_install_helper
|
||||
beaker-rspec
|
||||
guard-rake
|
||||
facter
|
||||
json
|
||||
metadata-json-lint
|
||||
puppet (~> 3.8.0)
|
||||
puppet-blacksmith
|
||||
puppet-lint-absolute_classname-check
|
||||
puppet-lint-classes_and_types_beginning_with_digits-check
|
||||
puppet-lint-leading_zero-check
|
||||
puppet-lint-trailing_comma-check
|
||||
puppet-lint-unquoted_string-check
|
||||
puppet-lint-version_comparison-check
|
||||
puppet
|
||||
puppet-lint (< 1.1.0)
|
||||
puppet_facts
|
||||
puppetlabs_spec_helper
|
||||
rake
|
||||
rspec (< 3.2.0)
|
||||
rspec-puppet!
|
||||
rspec-puppet-facts
|
||||
rubocop (= 0.33.0)
|
||||
simplecov (>= 0.11.0)
|
||||
simplecov-console
|
||||
travis
|
||||
travis-lint
|
||||
rspec-core (~> 3.1.7)
|
||||
rspec-puppet (~> 2.1)
|
||||
serverspec
|
||||
simplecov
|
||||
|
@ -133,11 +133,11 @@ class rsnapshot::config (
|
||||
$c_month = $rsnapshot::params::cron[$level]['month']
|
||||
$c_weekday = $rsnapshot::params::cron[$level]['weekday']
|
||||
}
|
||||
$minute = rand_from_array($c_min, "${host}.${level}")
|
||||
$hour = rand_from_array($c_hour, "${host}.${level}")
|
||||
$monthday = rand_from_array($c_monthday, "${host}.${level}")
|
||||
$month = rand_from_array($c_month, "${host}.${level}")
|
||||
$weekday = rand_from_array($c_weekday, "${host}.${level}")
|
||||
$minute = rand_from_array($c_min, "${host}.${level}.minute")
|
||||
$hour = rand_from_array($c_hour, "${host}.${level}.hour")
|
||||
$monthday = rand_from_array($c_monthday, "${host}.${level}.monthday")
|
||||
$month = rand_from_array($c_month, "${host}.${level}.month")
|
||||
$weekday = rand_from_array($c_weekday, "${host}.${level}.weekday")
|
||||
concat::fragment { "${host}.${level}":
|
||||
target => $cronfile,
|
||||
content => template('rsnapshot/cron.erb'),
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "loomsen-rsnapshot",
|
||||
"version": "0.1.2",
|
||||
"version": "0.1.4",
|
||||
"author": "loomsen",
|
||||
"summary": "Configures rsnapshot.",
|
||||
"license": "Apache-2.0",
|
||||
|
Loading…
Reference in New Issue
Block a user