diff options
author | Matt Taggart <taggart@riseup.net> | 2012-04-17 22:35:53 -0700 |
---|---|---|
committer | Matt Taggart <taggart@riseup.net> | 2012-04-17 22:35:53 -0700 |
commit | 571a286674b4a237bbe972aea2538332a0f739bf (patch) | |
tree | 347788fd4653f48842574f8c37232a520e56442a | |
parent | ddee618b2c5e54b7cdea53d86a71846f42b6fa3d (diff) | |
download | puppet-backupninja-571a286674b4a237bbe972aea2538332a0f739bf.tar.gz puppet-backupninja-571a286674b4a237bbe972aea2538332a0f739bf.tar.bz2 |
we don't need to stagger sys since it runs locally, it needs to be in rdiff instead. add control variable to turn it on
-rw-r--r-- | templates/rdiff.conf.erb | 10 | ||||
-rw-r--r-- | templates/sys.conf.erb | 7 |
2 files changed, 10 insertions, 7 deletions
diff --git a/templates/rdiff.conf.erb b/templates/rdiff.conf.erb index 23c336f..c948c2d 100644 --- a/templates/rdiff.conf.erb +++ b/templates/rdiff.conf.erb @@ -10,6 +10,16 @@ [source] type = local <%= 'keep = ' + keep if keep %> +<% if stagger -%> +when = everyday at 1:<%= i = 0 + total = 0 + until i == hostname.length + total += (hostname[i] - 96) / (2.9 * (10 ** (i + 1))) + total += (hostname[i] - 96) / (27.0 ** (i+1)) + i += 1 + end + (total*60).to_i %> +<% end -%> <% if include.is_a? String -%> <%= 'include = ' + include %> diff --git a/templates/sys.conf.erb b/templates/sys.conf.erb index 13e6106..a684e8b 100644 --- a/templates/sys.conf.erb +++ b/templates/sys.conf.erb @@ -9,13 +9,6 @@ end end -%> -when = everyday at 1:<%= i = 0 - total = 0 - until i == hostname.length - total += (hostname[i] - 96) / (2.9 * (10 ** (i + 1))) - i += 1 - end - (total*60).to_i %> packages = <%= packages ? 'yes' : 'no' %> partitions = <%= partitions ? 'yes' : 'no' %> dosfdisk = <%= dosfdisk ? 'yes' : 'no' %> |