Commit 4690c078de2da76ce0c9d38e38ab323156791964

Authored by nollieheel
1 parent d242d3e0

Version v0.1.2

... ... @@ -3,8 +3,8 @@ source "https://supermarket.chef.io"
3 3 metadata
4 4
5 5 cookbook 'cfe-users', git: 'https://gitlab.chromedia.com/ops/cfe-users.git', tag: 'v0.1.1'
6   -cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.0'
7   -cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.3.3'
  6 +cookbook 'cfe-mariadb', git: 'https://gitlab.chromedia.com/ops/cfe-mariadb.git', tag: 'v0.5.1'
  7 +cookbook 'backup-file2s3', git: 'https://gitlab.chromedia.com/ops/backup-file2s3.git', tag: 'v0.4.0'
8 8 cookbook 'cfe-nginx-php-fpm', git: 'https://gitlab.chromedia.com/ops/cfe-nginx-php-fpm.git', tag: 'v0.5.2'
9 9 cookbook 'cfe-simple-iptables', git: 'https://gitlab.chromedia.com/ops/cfe-simple-iptables.git', tag: 'v0.1.0'
10 10
... ...
  1 +## 0.1.2 - 2016-12-13
  2 +### Changed
  3 +- Updated dependency versions.
  4 +- Added proper attributes to 'aws_tar_extract' definition calls to account for new version of the cookbook 'backup-file2s3'.
  5 +
1 6 ## 0.1.1 - 2016-12-09
2 7 ### Added
3 8 - Include cookbook 'cfe-simple-iptables'. Also automatically add iptables that are listed in a secret data bag (see default attribute file).
... ...
... ... @@ -4,7 +4,7 @@ maintainer_email 'sysadmin@chromedia.com'
4 4 license 'Apache License'
5 5 description 'Simplifies setting up common Linux servers.'
6 6 long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
7   -version '0.1.1'
  7 +version '0.1.2'
8 8
9 9 %w{
10 10 cfe-users cfe-mariadb
... ...
... ... @@ -35,25 +35,28 @@ end
35 35
36 36 if node['backup-file2s3']['backups']
37 37 node['backup-file2s3']['backups'].each do |xback|
  38 + xbucket = xback[:bucket]
  39 + xregion = xback[:region]
  40 +
38 41 xback[:paths].each do |xpath|
39 42
40 43 # Each path spec can have the following additional attributes:
41 44 # {
42   - # :extract => true, # Default: true
43   - # :ex_creates => 'filename', # Relative to path.
44   - # :ex_priv_key => nil # Default is a node attribute
  45 + # :extract => true, # Default: true
  46 + # :ex_creates => 'filename' # Relative to path.
45 47 # }
46 48 unless xpath.has_key?(:extract) && xpath[:extract] == false
47   - tdir = ::File.dirname(xpath[:path])
48   - crea = "#{xpath[:path]}/#{xpath[:ex_creates]}"
49   - encr = xpath[:bak_encrypted]
50   - pkey = xpath.has_key?(:ex_priv_key) ? xpath[:ex_priv_key] : nil
  49 + ptarget_dir = ::File.dirname(xpath[:path])
  50 + pcreates = "#{xpath[:path]}/#{xpath[:ex_creates]}"
  51 + pencrypted = xpath[:bak_encrypted]
  52 + pfname = xpath[:bak_filename] || ::File.basename(xpath[:path])
51 53
52   - aws_tar_extract xpath[:bak_filename] do
53   - target_dir tdir
54   - creates crea
55   - encrypted encr
56   - priv_key pkey
  54 + aws_tar_extract pfname do
  55 + target_dir ptarget_dir
  56 + creates pcreates
  57 + encrypted pencrypted
  58 + bucket xbucket
  59 + region xregion
57 60 end
58 61 end
59 62
... ...